# Build the binaries in larger image
FROM docker.io/fortio/fortio.build:v63@sha256:5aa4391129408742ad58c82c642e57549980f06a6e2322044bb430babb490cb6 as build
WORKDIR /build
COPY . fortio
RUN make -C fortio official-build-version BUILD_DIR=/build OFFICIAL_TARGET=fortio.org/fortio/fcurl
# Minimal image with just the binary and certs
FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /build/result/fcurl /usr/bin/fcurl
ENTRYPOINT ["/usr/bin/fcurl"]
