Update 'build-doh-server.jenkins'

This commit is contained in:
Hyatt 2021-05-22 21:13:09 +00:00
parent d7e3f32b7e
commit f6b7d0c6ba

View File

@ -47,18 +47,15 @@ spec:
def dockerfile = """FROM ${repository}/dockerhub/library/golang:alpine AS BUILDER def dockerfile = """FROM ${repository}/dockerhub/library/golang:alpine AS BUILDER
RUN apk --no-cache add git upx && \\ RUN apk --no-cache add git upx && \\
go get github.com/m13253/dns-over-https/doh-server && \\ go install github.com/m13253/dns-over-https/doh-server@latest && \\
go get -d -v /go/src/github.com/m13253/dns-over-https/doh-server/... && \\ upx --brute /go/bin/doh-server
go install -v /go/src/github.com/m13253/dns-over-https/doh-server/... && \\
go build -ldflags="-s -w" -o /go/dohserver /go/src/github.com/m13253/dns-over-https/doh-server/ && \\
upx --brute /go/dohserver
FROM ${repository}/library/alpine:latest FROM ${repository}/library/alpine:latest
RUN apk add --no-cache && \\ RUN apk add --no-cache && \\
addgroup -S -g 1000 app && \\ addgroup -S -g 1000 app && \\
adduser -S app -G app -h /app -u 1000 adduser -S app -G app -h /app -u 1000
USER app USER app
WORKDIR /app WORKDIR /app
COPY --from=BUILDER /go/dohserver /app/ COPY --from=BUILDER /go/bin/doh-server /app/dohserver
ENTRYPOINT ./dohserver ENTRYPOINT ./dohserver
""" """