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 workflow for scientific computing
  • ERROR: Build process returned exit code 137 during Docker build on Tutum
  • Can't access OpenShift console on http://ip:8443
  • Docker upgrades failing due to conflicts
  • Get the names of containers in Docker
  • Ghost Blog on Ubuntu Snappy Core OS
  • UPDATE:

    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.

  • Is Docker capable of providing container with gigabit network?
  • How to prevent docker from starting a container automatically on system startup?
  • Cron in the same container works locally but fails in cluster
  • How do i allocate enough ram to run Object.stringify without a memory / RangeError
  • Prometheus vs ElasticSearch. Which is better for container and server monitoring?
  • Jenkins store workspace outside docker container
  • 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.