Skip to content

Commit db888e1

Browse files
authored
Merge pull request #19 from wantedly/bgpat/docker
Fix Dockerfile
2 parents e53e617 + 732d2da commit db888e1

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

Dockerfile

+11-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
FROM alpine:3.4
2-
3-
ENV GOPATH /go
4-
5-
RUN apk add --no-cache --update ca-certificates
6-
7-
COPY . /go/src/github.com/wantedly/dockertags
8-
9-
RUN apk add --no-cache --update --virtual=build-deps go git make mercurial \
10-
&& cd /go/src/github.com/wantedly/dockertags \
11-
&& make \
12-
&& cp bin/dockertags /dockertags \
13-
&& cd / \
14-
&& rm -rf /go \
15-
&& apk del build-deps
16-
17-
ENTRYPOINT ["/dockertags"]
1+
FROM golang:1.14 AS build
2+
WORKDIR /go/src/github.com/wantedly/dockertags
3+
COPY go.mod go.sum ./
4+
RUN go mod download
5+
COPY . .
6+
RUN go install -tags netgo -ldflags "-extldflags -static" .
7+
8+
FROM scratch
9+
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
10+
COPY --from=build /go/bin/dockertags /bin/dockertags
11+
ENTRYPOINT ["/bin/dockertags"]

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# dockertags
22

3-
[![Docker Repository on Quay](https://quay.io/repository/wantedly/dockertags/status "Docker Repository on Quay")](https://quay.io/repository/wantedly/dockertags)
3+
[![Docker Image](https://img.shields.io/docker/build/wantedly/dockertags)](https://hub.docker.com/r/wantedly/dockertags)
44

55
`dockertags` retrieves and print available Docker image tag list from image repository.
66

0 commit comments

Comments
 (0)