Skip to content

Commit 6e1b078

Browse files
committed
build: add docker minimal image
1 parent 69df6d8 commit 6e1b078

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

.goreleaser.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ builds:
3232
- 7
3333
goos:
3434
- linux
35+
- windows
36+
- darwin
3537
flags:
3638
- -trimpath
3739
nfpms:
@@ -78,17 +80,34 @@ archives:
7880
- replacements:
7981
Linux: linux
8082
386: i386
83+
windows: ctl_windows
84+
darwin: ctl_darwin
8185
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
8286
files:
8387
- LICENSE
8488
- README.md
8589
format: tar.gz
90+
format_overrides:
91+
- goos: windows
92+
format: zip
8693
dockers:
87-
- image_templates:
94+
- binaries:
95+
- trusted-cgi
96+
dockerfile: Dockerfile
97+
image_templates:
8898
- "reddec/trusted-cgi:{{ .Tag }}"
8999
- "reddec/trusted-cgi:v{{ .Major }}"
90100
- "reddec/trusted-cgi:v{{ .Major }}.{{ .Minor }}"
91101
- "reddec/trusted-cgi:latest"
102+
103+
- binaries:
104+
- trusted-cgi
105+
dockerfile: Dockerfile.minimal
106+
image_templates:
107+
- "reddec/trusted-cgi:{{ .Tag }}-light"
108+
- "reddec/trusted-cgi:v{{ .Major }}-light"
109+
- "reddec/trusted-cgi:v{{ .Major }}.{{ .Minor }}-light"
110+
- "reddec/trusted-cgi:latest-light"
92111
checksum:
93112
name_template: 'checksums.txt'
94113
snapshot:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM nimlang/nim:alpine
2-
RUN apk add --no-cache python3 py3-setuptools py3-virtualenv php nodejs npm make
2+
RUN apk add --no-cache python3 py3-setuptools py3-virtualenv php nodejs npm make git
33
EXPOSE 3434
44
VOLUME /data
55
WORKDIR /data

Dockerfile.minimal

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM alpine:3.11
2+
RUN apk add --no-cache make
3+
EXPOSE 3434
4+
VOLUME /data
5+
WORKDIR /data
6+
ENV INITIAL_ADMIN_PASSWORD admin
7+
ENV BIND 0.0.0.0:3434
8+
COPY trusted-cgi /
9+
ENTRYPOINT ["/trusted-cgi", "--disable-chroot"]

0 commit comments

Comments
 (0)