I'm run docker in windows10 ,my dockerfile like this
FROM python:2.7-slim
WORKDIR E:/docker
ADD . E:/docker
RUN pip install -r requirements.txt
EXPOSE 80
ENV NAME World
CMD ["python", "app.py"]
when i run
docker build -t friendlyhello .
i get a wrong like this:
E:\docker-demo>docker build -t friendlyhello .
Sending build context to Docker daemon 4.608kB
Step 1/7 : FROM python:2.7-slim
---> d0d1b97dd328
Step 2/7 : WORKDIR E:/docker
---> Using cache
---> 305b573b82a5
Step 3/7 : ADD . E:/docker
---> 6d25bd33ba84
Step 4/7 : RUN pip install -r E:/docker-demo/requirements.txt
---> Running in e68dd3cd1c71
Could not open requirements file: [Errno 2] No such file or directory:
'E:/docker-demo/requirements.txt'
The command '/bin/sh -c pip install -r E:/docker-demo/requirements.txt' returned a non-zero code: 1
it make the RUN as /bin/sh -c
. but it shoud be cmd /S /C
in windows
,and it can be worked when I run the pip install -r requirements.txt
at commonds lines direct.I have no idea how to resove it.thanks for answer