I am learning Docker concept and trying to make a Docker image of my project. I have installed Docker Desktop for Windows and build the image successfully by using below command:
docker build -t ${IMAGE_NAME} .
But when I run following command docker run ${IMAGE_NAME}:${TAG}
I am getting following file not found error:
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
My project structure is looks like:
And my Dockerfile.txt has following instructions:
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"]
I suspect I am missing something related to file path. Please see my Dockerfile and my project structure and help me to find out what I am doing wrong here.