Skip to content

Commit

Permalink
build: add docker minimal image
Browse files Browse the repository at this point in the history
  • Loading branch information
reddec committed Jun 17, 2020
1 parent 69df6d8 commit 6e1b078
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
21 changes: 20 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ builds:
- 7
goos:
- linux
- windows
- darwin
flags:
- -trimpath
nfpms:
Expand Down Expand Up @@ -78,17 +80,34 @@ archives:
- replacements:
Linux: linux
386: i386
windows: ctl_windows
darwin: ctl_darwin
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
files:
- LICENSE
- README.md
format: tar.gz
format_overrides:
- goos: windows
format: zip
dockers:
- image_templates:
- binaries:
- trusted-cgi
dockerfile: Dockerfile
image_templates:
- "reddec/trusted-cgi:{{ .Tag }}"
- "reddec/trusted-cgi:v{{ .Major }}"
- "reddec/trusted-cgi:v{{ .Major }}.{{ .Minor }}"
- "reddec/trusted-cgi:latest"

- binaries:
- trusted-cgi
dockerfile: Dockerfile.minimal
image_templates:
- "reddec/trusted-cgi:{{ .Tag }}-light"
- "reddec/trusted-cgi:v{{ .Major }}-light"
- "reddec/trusted-cgi:v{{ .Major }}.{{ .Minor }}-light"
- "reddec/trusted-cgi:latest-light"
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM nimlang/nim:alpine
RUN apk add --no-cache python3 py3-setuptools py3-virtualenv php nodejs npm make
RUN apk add --no-cache python3 py3-setuptools py3-virtualenv php nodejs npm make git
EXPOSE 3434
VOLUME /data
WORKDIR /data
Expand Down
9 changes: 9 additions & 0 deletions Dockerfile.minimal
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM alpine:3.11
RUN apk add --no-cache make
EXPOSE 3434
VOLUME /data
WORKDIR /data
ENV INITIAL_ADMIN_PASSWORD admin
ENV BIND 0.0.0.0:3434
COPY trusted-cgi /
ENTRYPOINT ["/trusted-cgi", "--disable-chroot"]

0 comments on commit 6e1b078

Please sign in to comment.