PyCharm Docker Deployment “[Errno 2] No such file or directory”

I’ve set up the Docker Deployment plugin on PyCharm, however, on hitting play, the Deploy log shows a failure with:

Could not open requirements file: [Errno 2] No such file or directory: 'environments/dev/requirements.txt'

I assume that this has something to do with the docker build context that is part of the Docker Deployment plugin. I’ve confirmed that there is in fact a requirements.txt file in the environments/dev/ directory inside the root of my PyCharm project. Does anyone know how to specify the docker build context/path in PyCharm or the Docker Deployment plugin?

  • Docker read-only API access
  • Docker - Cannot remove dead container
  • Referencing files inside build (Docker)
  • Get image id from image created via remote API
  • Keeping PostgreSQL data in docker and OSX
  • MySQL - Galera OR Kubernetes Replication Controller?

    By adding RUN ls -l to the Dockerfile, I was able to deduce that the plugin is running from the same directory as the Dockerfile. Still looking for a way to specify the build path if it’s at all possible.

  • How to connect to 'real' localhost from inside my VM boot2docker container?
  • How to add jenkins user to docker startup options on a Mac?
  • How to run services on startup in docker container
  • Using Gitlab CD and Docker
  • Connection refused when trying to run Kong API Gateway using a docker container
  • Docker - curl returned “connection reset”
  • One Solution collect form web for “PyCharm Docker Deployment “[Errno 2] No such file or directory””

    My current solution to this problem is to move the Dockerfile to the root directory of my PyCharm project so that when ADD . /var/app is run, it copies over the correct files. As I mentioned in the “UPDATE”, the PyCharm plugin uses the directory the Dockerfile is run from as the build context/path.

    Would still like to be able to specify the build path, but this may be the best solution given the limitations of the plugin.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.