Docker Community Forums

Share and learn in the Docker community.

Check the file contents of a docker image

Hey, I am new to docker and I built my image with

docker build -t mycontainer .

The contents of my Dockerfile is

FROM python:3
COPY ./* /my-project/
RUN pip install -r requirements.txt
CMD python /my-project/

Here I get an error:

Could not open requirements file: No such file or directory: 'requirements.txt'

I am not sure if all the files from my local are actually copied to the image.

I want to inspect the contents of the image, is there any way I can do that?

Any help will be appreciated!

Oh sorry, I missed the WORKDIR in the Dockerfile. This will change the working directory and look for the requirements.txt file over there.