Skip to content

Commit cf13ff9

Browse files
committed
rename dockerfiles
1 parent 071cd28 commit cf13ff9

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

.goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ dockers:
8383
- image_templates:
8484
- 'goodwithtech/dockertags:{{ .Tag }}-amd64'
8585
- 'ghcr.io/goodwithtech/dockertags:{{ .Tag }}-amd64'
86-
dockerfile: Dockerfile
86+
dockerfile: Dockerfile.releaser
8787
build_flag_templates:
8888
- "--pull"
8989
- "--label=org.opencontainers.image.created={{.Date}}"
@@ -95,7 +95,7 @@ dockers:
9595
- image_templates:
9696
- 'goodwithtech/dockertags:{{ .Tag }}-arm64'
9797
- 'ghcr.io/goodwithtech/dockertags:{{ .Tag }}-arm64'
98-
dockerfile: Dockerfile
98+
dockerfile: Dockerfile.releaser
9999
build_flag_templates:
100100
- "--pull"
101101
- "--label=org.opencontainers.image.created={{.Date}}"

Dockerfile

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1-
FROM alpine:3.13
2-
COPY dockertags /dockertags
3-
ENTRYPOINT ["/dockertags"]
1+
FROM golang:1.13-alpine AS builder
2+
COPY go.mod go.sum /app/
3+
WORKDIR /app/
4+
RUN apk --no-cache add git
5+
RUN go mod download
6+
COPY . /app/
7+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o /dockertags cmd/dockertags/main.go
8+
9+
FROM alpine:3.11
10+
COPY --from=builder /dockertags /usr/local/bin/dockertags
11+
RUN chmod +x /usr/local/bin/dockertags
12+
RUN apk --no-cache add ca-certificates shadow
13+
14+
# for use docker daemon via mounted /var/run/docker.sock
15+
RUN addgroup -S docker && adduser -S -G docker dockertags
16+
USER dockertags
17+
18+
ENTRYPOINT ["dockertags"]

Dockerfile.manual

Lines changed: 0 additions & 18 deletions
This file was deleted.

Dockerfile.releaser

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM alpine:3.13
2+
COPY dockertags /dockertags
3+
ENTRYPOINT ["/dockertags"]

0 commit comments

Comments
 (0)