I'm trying to follow the instructions on slimming my Docker files by using multi-stage builds. In particular, I try to copy over the built executable from the builder image into alpine:latest
with the following Dockerfile:
FROM debian:stable-slim AS builder
RUN apt-get update && \
apt-get install -y --no-install-recommends fp-compiler fp-units-fcl fp-units-net libc6-dev
COPY src /whatwg/wattsi/src
RUN /whatwg/wattsi/src/build.sh
FROM alpine:latest
COPY --from=builder /whatwg/wattsi/bin /whatwg/wattsi/bin
ENTRYPOINT ["/whatwg/wattsi/bin/wattsi"]
However, when I try to run the resulting docker image using docker run
, I get the error
standard_init_linux.go:211: exec user process caused "no such file or directory"
What is going on, and how do I fix this?