Skip to content

Commit bacb447

Browse files
Fix docker image publish in goreleaser.yml
1 parent dcb218f commit bacb447

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

.goreleaser.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ builds:
1212
- amd64
1313
- arm
1414
- arm64
15-
docker:
16-
image_templates:
17-
- "thecasualcoder/{{ .ProjectName }}:{{ .Tag }}"
18-
- "thecasualcoder/{{ .ProjectName }}:v{{ .Major }}"
19-
- "thecasualcoder/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}"
20-
- "thecasualcoder/{{ .ProjectName }}:latest"
15+
dockers:
16+
- image_templates:
17+
- "thecasualcoder/{{ .ProjectName }}:{{ .Tag }}"
18+
- "thecasualcoder/{{ .ProjectName }}:v{{ .Major }}"
19+
- "thecasualcoder/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}"
20+
- "thecasualcoder/{{ .ProjectName }}:latest"
2121
archives:
2222
- replacements:
2323
darwin: Darwin

Dockerfile

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
FROM golang:1.16 as builder
2-
WORKDIR /go/src/github.com/thecasualcoder/dobby
3-
COPY ./ ./
4-
RUN make build-deps compile
5-
61
FROM ubuntu:bionic
7-
COPY --from=builder /go/src/github.com/thecasualcoder/dobby/out/dobby /usr/local/bin/
2+
COPY ./dobby /usr/local/bin/
83
EXPOSE 4444
94
RUN useradd -ms /bin/bash dobby
105
USER dobby

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -382,3 +382,4 @@ Fork the repo and start contributing
382382
- Make sure to run build before raising PR (`make build`)
383383
- Make sure to generate and check in swagger docs if any added (`make swagger-docs`)
384384
- Update README.md if necessary
385+
- Check goreleaser before pushing (`goreleaser --snapshot --skip-publish --rm-dist --debug`)

build.Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM golang:1.16 as builder
2+
WORKDIR /go/src/github.com/thecasualcoder/dobby
3+
COPY ./ ./
4+
RUN make build-deps compile
5+
6+
FROM ubuntu:bionic
7+
COPY --from=builder /go/src/github.com/thecasualcoder/dobby/out/dobby /usr/local/bin/
8+
EXPOSE 4444
9+
RUN useradd -ms /bin/bash dobby
10+
USER dobby
11+
CMD ["dobby", "server", "--bind-address", "0.0.0.0"]

0 commit comments

Comments
 (0)