Tag: python

How to access a remote django app that's running on docker

I’m currently trying to run a django website through a docker container on an AWS server using Tutum. I’ve looked at countless ways to access it through my web browser to no avail. I got my public IP like so- curl -s checkip.dyndns.org | sed -e ‘s/.*Current IP Address: //’ -e ‘s/<.*$//’ and set the […]

Should I dockerize different servers running on a single machine?

I want to make simple service that each user will have his own (simple and light) webserver. I want to use an AWS instance to do this. I understand that I can do that by starting Python’s SimpleHTTPserver (Proof of concept) multiple times on different ports, and that the number of servers I can have […]

Docker django Import Error : No module named 'social'

I am new to Docker+Django development environment. I am facing difficulties in adding python-social-auth into my project. Following is the configurations in workspace: requirement.txt Django==1.9 psycopg2==2.6 python-social-auth==0.2.14 settings.py INSTALLED_APPS = [ . . ‘home’, ‘social.apps.django_app.default’, ] And when trying to run migrate command as follows: docker-compose run web python manage.py migrate getting following error message: […]

Are there any simple python packages that will run a prebuilt docker image

I know there are a ton of articles, blogs, and SO questions about running python applications inside a docker container. But I am looking for information on doing the opposite. I have a distributed application with a lot of independent components, and I have put each of these components inside a docker container(s) that I […]

Run multiple Python scripts in Azure (using Docker?)

I have a Python script that consumes an Azure queue, and I would like to scale this easily inside Azure infrastructure. I’m looking for the easiest solution possible to run the Python script in an environment that is as managed as possible have a centralized way to see the scripts running and their output, and […]

Importing a MySQL database with a Python script fails when the same command works on the command line, what gives?

I’m running a MySQL server in docker container and am trying to import a .sql file in a Python script (Flask app). This is my code: os.system(“docker exec -i %s_db_1 mysql -u<username> -p<password> <db name> < %s” % (name, db_file)) It returns this error in the terminal the Flask app is running in: ERROR 1064 […]

Port binding with a container in docker-py doesn't work

I’m trying to run a container using docker-py and bind ports with the host. I’m afraid I’m not experimented with Docker, but I try many things and I can’t see where my mistake is. My docker API version is 1.22 Here is my code for create the container : from docker import Client cli = […]

Error while running portia on docker in ubuntu

I am getting following error while running portia on docker in ubuntu 14.04. I have gone through following answers, but they are not working. Autobahn websocket issue while running with twistd using tac file docker command: sudo docker run –rm -p 9001:9001 –name portia portia Docker version 1.9.1, build a34a1d5 Twisted: 15.5.0 python – 2.7 […]

Can't import own python module in Postgresql plpython function

I created my own python module and packaged it with distutils. Now I installed it on a new system (python setup.py install) and I’m trying to call it from a plpython3u function, but I get an error saying the module does not exist. It was working on a previous Ubuntu instalation, and I’m not sure […]

Using pytz as non-root in Docker with Alpine Linux causes “IOError: [Errno 13] Permission denied”

I have the following Dockerfile (it’s a bit stripped down, the core elements are displayed here) FROM alpine:latest RUN adduser -D some_user_name &&\ apk add –update alpine-sdk &&\ apk add –update python-dev &&\ apk add –update py-dateutil &&\ apk add –update py-tz USER some_user_name CMD [“/bin/sh”] I then run this image the following way docker […]

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