2023-02-16 06:09:57 -08:00
|
|
|
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
|
|
|
|
FROM --platform=linux/amd64 docker.io/golang:1.19.2@sha256:0467d7d12d170ed8d998a2dae4a09aa13d0aa56e6d23c4ec2b1e4faacf86a813 AS build
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-03-07 11:25:42 -08:00
|
|
|
COPY pipeline pipeline
|
|
|
|
COPY common common
|
2023-02-16 06:09:57 -08:00
|
|
|
|
|
|
|
# Build the Go app
|
2023-03-07 11:25:42 -08:00
|
|
|
RUN cd pipeline && make build
|
2023-02-16 06:09:57 -08:00
|
|
|
|
|
|
|
############################
|
|
|
|
# STEP 2 build a small image
|
|
|
|
############################
|
|
|
|
FROM alpine
|
|
|
|
#Copy certificates
|
|
|
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
|
|
# Copy our static executable.
|
2023-06-12 06:00:23 -07:00
|
|
|
COPY --from=build "/app/pipeline/bin/pipeline" "/pipeline"
|
2023-02-16 06:09:57 -08:00
|
|
|
# Run the binary.
|
|
|
|
ENTRYPOINT ["/pipeline"]
|