try same OS for build/run images, per feedback #2
@ -8,7 +8,7 @@ RUN golangci-lint run
|
|||||||
|
|
||||||
## build image:
|
## build image:
|
||||||
#ARG GO_VERSION=1.15
|
#ARG GO_VERSION=1.15
|
||||||
FROM golang:1.15-alpine AS builder
|
FROM golang:1.15-buster AS builder
|
||||||
|
|
||||||
RUN mkdir /user && \
|
RUN mkdir /user && \
|
||||||
echo 'nobody:x:65534:65534:nobody:/:' > /user/passwd && \
|
echo 'nobody:x:65534:65534:nobody:/:' > /user/passwd && \
|
||||||
@ -32,7 +32,7 @@ RUN go mod vendor
|
|||||||
RUN tar -c . | bzip2 > /src.tbz2
|
RUN tar -c . | bzip2 > /src.tbz2
|
||||||
|
|
||||||
## output image:
|
## output image:
|
||||||
FROM ubuntu:focal AS final
|
FROM debian:buster-slim AS final
|
||||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
COPY --from=builder /build/httpd /app/httpd
|
COPY --from=builder /build/httpd /app/httpd
|
||||||
COPY --from=builder /src.tbz2 /usr/local/src/src.tbz2
|
COPY --from=builder /src.tbz2 /usr/local/src/src.tbz2
|
||||||
|
Loading…
Reference in New Issue
Block a user