Skip to content

Commit

Permalink
Revert "fix: allow the project to complete the build in the docker"
Browse files Browse the repository at this point in the history
  • Loading branch information
looterz committed Mar 18, 2022
1 parent b99382a commit 935ce3a
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
FROM alpine:3.15.0 as certs
RUN apk --update add ca-certificates

FROM golang:1.18.0-alpine3.15 AS builder
RUN apk add git bash gcc musl-dev upx
WORKDIR /app
COPY . .
RUN go mod tidy
RUN go test -v ./...
ENV CGO_ENABLED=0
RUN GOARCH=amd64 go build -ldflags "-w -s" -v ./...
RUN upx -9 -o grimd.minify grimd && mv grimd.minify grimd

FROM scratch
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /app/grimd /usr/bin/grimd
EXPOSE 53:53/udp
EXPOSE 53:53/tcp
EXPOSE 8080
COPY grimd /usr/bin/grimd
EXPOSE 53/udp
EXPOSE 53/tcp
EXPOSE 8080/tcp
ENTRYPOINT ["/usr/bin/grimd"]

0 comments on commit 935ce3a

Please sign in to comment.