Tag: python

Running docker in subprocess on Python PyCharm

I have a command that looks like: p = subprocess.Popen([‘docker’, ‘run’, ‘imagename’]) in a Python program. I am able to execute this successfully from terminal, however when I run it in PyCharm I receive this error: Cannot connect to the Docker daemon. Is the docker daemon running on this host How can I fix this […]

piping data to exec_create & stdin/stdout

I’ve re-written this question to better communicate what I’m trying to achieve. If I use the docker CL this works perfectly for me. echo “hello” | docker exec -i $3 sh -c ‘cat >/text.txt’ Now I want to use docker-py and have this so far: ex = cli.exec_create(container=’nginx-ssl’, cmd=’cat >/text.txt’) print cli.exec_inspect(ex) ls = cli.exec_start(exec_id=ex[“Id”], […]

How do I setup a read only private docker registry using just HTTP?

I am running my own private registry and wish to deliver the image data over plain HTTP instead of using the docker-registry python application. Is there a way to configure nginx (or any other web server) to deliver registry image data? nginx can do a much better job scaling delivery of image data than the […]

How to have multiple django requirements file mentioned in fig file for docker deployment across dev, staging and prod servers?

I just wrote my first fig file. It makes working with docker really awesome. I want fig to launch my local, staging, and prod containers as well. So I wrote 3 different fig files. fig-dev.yml, fig-stage.yml and fig-prod.yml. The three yml files contain the images that needs to be pulled as per the requirements of […]

how to debug python in IntelliJ idea using vagrant docker

I am using Vagrant with a Ubuntu machine. Inside Vagrant I am using multiple docker boxes. One of them is for my Python Django Api. Is there any good way to connect to Django with IntelliJ Idea/Pycharm ? I am trying to using pycharm-debug.egg but I can’t connect. Should I forward the port from docker […]

Backup running postgres docker container

I am trying to backup a running postgres container, without luck. What I have so far is a data only container, with – /var/lib/postgresql/data volume, and a main database container running official postgres images, with –volumes-from data only container. I tried backing up /data directory of the running postgres container, and then restoring it, however […]

Flask web app, Node.js (queue) worker. Can't make docker work

I have an app with the following services: web/ – holds and runs a python 3 flask web server on port 5000. Uses sqlite3. worker/ – has an index.js file which is a worker for a queue. the web server interacts with this queue using a json API over port 9730. The worker uses redis […]

Extra characters appearing in Flask JavaScript files

Something very random has happened during my development and I can’t for the life of me figure out what has gone wrong or why. Im building an application in Flask as well as using Docker. Everything has been running fine up until now. If I have a JavaScript file that if I modify Flask loads […]

How to debug dockerfiles when using gcloud and google app engine

I am using Google App Engine and PyCharm 4.0.4 and GCloud managedvm. I am attempting to access more information about the building of my dockerfile than is given by console output when running locally using dev_appserver.py . medusavm is a python linux console app that can convert python code to dart code, among other functionalities. […]

docker-compose error Unicode-objects must be encoded before hashing

I started to use docker since few days and I wanted to create a new project with multiple containers, so I tried docker-compose but when I try to launch docker-compose run river I have this stack trace : Traceback (most recent call last): File “/bin/docker-compose”, line 9, in <module> load_entry_point(‘docker-compose==1.3.0’, ‘console_scripts’, ‘docker-compose’)() File “/usr/lib/python3.4/site-packages/compose/cli/main.py”, line […]

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