我尝试按照docker Hub上的文档构建docker映像。以下是docker图像内容:
FROM alpine:latest
# This sets the image we start building from
RUN apk add --update \ # first update
python3 \ # Install Python
py-pip \ # Install pip
&& pip install flywheel-sdk \ # Use pip to install the flywheel SDK
&& rm -rf /var/cache/apk/* # Cleanup install files
ENV FLYWHEEL=/flywheel/v0
# Setup default flywheel/v0 directory
RUN mkdir -p ${FLYWHEEL} # Create that directory
COPY run.py ${FLYWHEEL}/run.py # Copy in our runscript into the docker image
ENTRYPOINT ["python run.py"] # Set an entrypoint
当我执行docker build
时,我得到一个错误,看起来Python无法从alpine:python
映像加载
(base) isabelannwingert@Isabels-MacBook-Pro PET_gear % docker build -t isabelannwingert36/alpine-python-3:0.1.0 ./
Sending build context to Docker daemon 6.144kB
Error response from daemon: Dockerfile parse error line 4: unknown instruction: PYTHON3
当我重新执行docker pull alpine:latest
时,它告诉我所有内容都是最新的,但我在Docker Hub上的存储库中也没有看到它
还有什么我可以试试的吗?(我是Docker Hub的新手,请原谅我的天真)
Docker不支持同一行注释。这就是问题所在。请像这样重写你的代码
相关问题 更多 >
编程相关推荐