【发布时间】:2020-09-11 09:50:50
【问题描述】:
我正在尝试按照使用 multi-stage builds 精简 Docker 文件的说明进行操作。特别是,我尝试使用以下 Dockerfile 将构建的可执行文件从构建器映像复制到 alpine:latest:
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"]
但是,当我尝试使用 docker run 运行生成的 docker 映像时,出现错误
standard_init_linux.go:211: exec user process caused "no such file or directory"
发生了什么,我该如何解决?
【问题讨论】: