Dockerfile 502 B

123456789101112131415
  1. FROM alpine:3 AS certs
  2. RUN apk add --no-cache ca-certificates
  3. FROM scratch
  4. # Copy the binary to the production image from the builder stage.
  5. # RUN set -x && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
  6. # ca-certificates && apt-get install libc6 && rm -rf /var/lib/apt/lists/*
  7. COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
  8. COPY ./main /server
  9. # Set workdir.
  10. # RUN chmod +x /app/main
  11. # Run the web service on container startup.
  12. CMD ["./server"]