chore: Adds a Dockerfile.

This commit is contained in:
Fernandez Ludovic 2019-02-24 14:51:22 +01:00
parent cba7750833
commit 344fceadc8
2 changed files with 23 additions and 0 deletions

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM golang:1-alpine as builder
RUN apk --update upgrade \
&& apk --no-cache --no-progress add git make gcc musl-dev \
&& rm -rf /var/cache/apk/*
WORKDIR /go/src/github.com/ldez/traefik-certs-dumper
COPY . .
RUN go get -u github.com/golang/dep/cmd/dep
ENV GO111MODULE on
RUN go mod download
RUN make build
FROM alpine:3.9
RUN apk --update upgrade \
&& apk --no-cache --no-progress add ca-certificates git \
&& rm -rf /var/cache/apk/*
COPY --from=builder /go/src/github.com/ldez/traefik-certs-dumper/traefik-certs-dumper /usr/bin/traefik-certs-dumper
ENTRYPOINT ["/usr/bin/traefik-certs-dumper"]

View File

@ -2,6 +2,7 @@
[![GitHub release](https://img.shields.io/github/release/ldez/traefik-certs-dumper.svg)](https://github.com/ldez/traefik-certs-dumper/releases/latest)
[![Build Status](https://travis-ci.org/ldez/traefik-certs-dumper.svg?branch=master)](https://travis-ci.org/ldez/traefik-certs-dumper)
[![Docker Build Status](https://img.shields.io/docker/build/ldez/traefik-certs-dumper.svg)](https://hub.docker.com/r/ldez/traefik-certs-dumper/builds/)
[![Go Report Card](https://goreportcard.com/badge/github.com/ldez/traefik-certs-dumper)](https://goreportcard.com/report/github.com/ldez/traefik-certs-dumper)
```yaml