# 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/echosrv
# Minimal image with just the binary
FROM scratch
COPY --from=build /build/result/echosrv /usr/bin/echosrv
EXPOSE 8080
ENTRYPOINT ["/usr/bin/echosrv"]
