我正在学习Docker的概念,并尝试制作我的项目的Docker镜像。我已经安装了Windows版的Docker桌面应用程序,并通过以下命令成功构建了镜像:
但是,当我运行以下命令
docker build -t ${IMAGE_NAME} .
但是,当我运行以下命令
docker run ${IMAGE_NAME}:${TAG}
时,我遇到了以下文件未找到的错误:
我的项目结构如下: 我的Dockerfile.txt有以下指令:D:\Projects\AI360\deep_auto_backbar_api>docker run dsbyprateekg:prateek_gupta python3: can't open file '/Prepare_Dataset/server_engine/server.py': [Errno 2] No such file or directory
FROM python: 3.6-stretch
MAINTAINER PrateekG
# install build utilities
RUN apt-get update && \
apt-get install -y gcc make apt-transport-https ca-certificates build-essential
# check our python environment
RUN python3 version RUN pip3 --version
# Installing python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all the files from the project's root to the working directory
COPY Prepare_Dataset/ .
# Running Python Application
CMD ["python3", "/Prepare_Dataset/server_engine/server.py"]
我怀疑我在文件路径方面遗漏了一些东西。请看看我的Dockerfile和项目结构,帮助我找出我在这里做错了什么。