File tree 5 files changed +30
-2
lines changed
5 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ builds:
10
10
- arm64
11
11
dockers :
12
12
- image_templates : ["ghcr.io/looterz/grimd:latest"]
13
- dockerfile : Dockerfile
13
+ dockerfile : docker/ Dockerfile.gorelease
14
14
build_flag_templates :
15
15
- --label=org.opencontainers.image.title={{ .ProjectName }}
16
16
- --label=org.opencontainers.image.description={{ .ProjectName }}
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ env GOOS=linux GOARCH=amd64 go build -v github.com/looterz/grimd
131
131
Run container and test
132
132
``` shell
133
133
mkdir sources
134
- docker build -t grimd:latest . && \
134
+ docker build -t grimd:latest -f docker/Dockerfile . && \
135
135
docker run -v $PWD /sources:/sources --rm -it -P --name grimd-test grimd:latest --config /sources/grimd.toml --update
136
136
```
137
137
Original file line number Diff line number Diff line change
1
+ FROM alpine:3.15.0 as certs
2
+ RUN apk --update add ca-certificates
3
+
4
+ FROM golang:1.18.0-alpine3.15 AS builder
5
+ RUN apk add git bash gcc musl-dev upx
6
+ WORKDIR /app
7
+ COPY . .
8
+ RUN go mod tidy
9
+ RUN go test -v ./...
10
+ ENV CGO_ENABLED=0
11
+ RUN GOARCH=amd64 go build -ldflags "-w -s" -v ./...
12
+ RUN upx -9 -o grimd.minify grimd && mv grimd.minify grimd
13
+
14
+ FROM scratch
15
+ COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
16
+ COPY --from=builder /app/grimd /usr/bin/grimd
17
+ EXPOSE 53:53/udp
18
+ EXPOSE 53:53/tcp
19
+ EXPOSE 8080
20
+ ENTRYPOINT ["/usr/bin/grimd" ]
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ # Docker Directory
2
+
3
+ This directory stores some Docker related files.
4
+
5
+
6
+ And contains some unfinished tasks, welcome to join us to improve together:
7
+
8
+ - [ #96 ] ( https://github.com/looterz/grimd/issues/96 )
You can’t perform that action at this time.
0 commit comments