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
RUN apk --no-cache add git upx && \\
go get github.com/m13253/dns-over-https/doh-server && \\
go get -d -v /go/src/github.com/m13253/dns-over-https/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
go install github.com/m13253/dns-over-https/doh-server@latest && \\
upx --brute /go/bin/doh-server
FROM ${repository}/library/alpine:latest
RUN apk add --no-cache && \\
addgroup -S -g 1000 app && \\
adduser -S app -G app -h /app -u 1000
USER app
WORKDIR /app
COPY --from=BUILDER /go/dohserver /app/
COPY --from=BUILDER /go/bin/doh-server /app/dohserver
ENTRYPOINT ./dohserver
"""