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?

  • Running Watchdog inside a container to monitor attached directories
  • How to set up a Docker Swarm cluster with overlay network mode
  • Is Memory consumption is also Dynamic just like CPU for Docker Containers
  • How to keep docker containers running when they are installed with ansible
  • PEPS mail, smtp able to send email externally but not receiving
  • Deployment Rails app for Docker

    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.

  • GitLab CI runner - can't access other repository
  • docker restart,exit command, reboot the host machine
  • WSO2 not compatible with Docker
  • MAC | Access application deployed on Docker from another application on VirtualBox machine
  • Starting delayed_job with Dokku
  • ODBC Driver 13 for SQL Server can't open lib on pyodbc while connecting on ubuntu docker image
  • 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.