Tag: python

pyftpdlib Networkprotocol Error

I am using pyftpdlib and pymongo to build a FTP server with GridFS. Locally everything is working great. Now I want to run the server using Docker. I am using the Dockerimage python:3.6-alpine and a mongo:latest image. I run the ftp with: docker run -it –rm -p 21:21 ftpimage And the mongo image with: docker […]

How do I install and use gdb inside a docker?

I used the following code in docker but that didnt work RUN mkdir gdb-build ;\ cd gdb-build;\ wget http://ftp.gnu.org/gnu/gdb/gdb-7.11.tar.xz;\ tar -xvf gdb-7.11.tar.xz;\ cd gdb-7.11;\ ./configure –prefix=/usr;\ make;\ make -C gdb install;\ cd ..;\ rm -rf gdb-build/; But its says this when i run it the output is this: Connecting to ftp.gnu.org ( gdb-7.11.tar.xz 0% | […]

How to bind a port when using docker-py to create a service? [duplicate]

This question already has an answer here: how to bind ports with docker-py 2 answers

Are uWSGI and Nginx required to serve a Flask app?

Setting up Flask with uWSGI and Nginx is quite difficult, and even with buildout scripts it takes quite some time, and has to be recorded to instructions to be reproduced later. If I don’t plan a big load on server (it’s hidden from public), does it make sense to run it without uWSGI? (Flask can […]

What causes this intermittent nix-build failure with error “Too many levels of symbolic links”?

I have written a Nix expression for a Python environment used in another Nix expression for a Docker image containing a collection of mostly-Python software I’m maintaining. Most of the time the build succeeds. Sometimes, not very often, the build fails with an error very much like this one: rsync: readlink_stat(“/nix/store/898mvvvdja9a8svkvnyid72gwggjfk92-python-2.7.13-env/lib/python2.7/site-packages/nevow/js/Nevow”) failed: Too many levels […]

Is there any way to make sure you read line by line from docker-py logs when in stream mode?

I’m using https://docker-py.readthedocs.io/en/stable/ and read the logs with for line in container.logs(stream=True): but doesn’t look like I always get a full line. Sometimes I get partial line and on next iteration I get the full line. Is there any way to make sure I read a full line before I process it?

How can I numactl membind a process inside Docker container?

I have an Intel Xeon Phi 64-core CPU with 16GB on-chip memory set as NUMA node 1. I want to bind a process running inside a Docker container to this NUMA node, but it errors out: root@Docker$ sudo numactl –membind 1 python script.py Error: set_mempolicy: Operation not permitted setting membind: Operation not permitted I also […]

Why do I get an error when I want to run cv2.imshow within docker container

When I run within python cv2.imshow(‘img’, image) within a docker container it throws the following error QXcbConnection: Could not connect to display :0 Aborted How can I enable my docker container to display the image?

Why are my gunicorn Python/Flask workers exiting from signal term?

I have a Python/Flask web application that I am deploying via Gunicorn in a docker image on Amazon ECS. Everything is going fine, and then suddenly, including the last successful request, I see this in the logs: [2017-03-29 21:49:42 +0000] [14] [DEBUG] GET /heatmap_column/e4c53623-2758-4863-af06-91bd002e0107/ADA [2017-03-29 21:49:43 +0000] [1] [INFO] Handling signal: term [2017-03-29 21:49:43 +0000] […]

How to start a python script after etcd is running in a single docker container?

I have built a docker file composed by python2.7-alpine and etcd (https://hub.docker.com/r/elcolio/etcd/), I’m trying to run a python script right after the etcd is running (from the same container), however I get connection error because the etcd has not up yet. Any suggestions? (I tried to make another CMD after last CMD and also to […]

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