Tag: ubuntu

Setting PYTHONPATH in Ubuntu 16.04 for a Docker image to run properly

I have a docker image that is running a gunicorn process, but everytime it runs I get the error ImportError: No module named ‘crm’. So I am following this SO post to solve this issue. However, when I run ENTRYPOINT [“PYTHONPATH=`pwd`/..”, “/usr/local/bin/gunicorn”, “web_interface:app”, “-w 4”, “-t 90”, “–log-level=debug”, “-b 0.0.0.0:8000”, “–reload”] the container spits back […]

Docker on mac: How to auto restart daemon processes after a machine reboot?

How does one auto-restart a docker-compose process after the machine reboots? For non-docker processes, I use supervisord on Ubuntu. Is there an equivalent on mac for docker-compose? What about on Ubuntu?

Allow Docker to cache RUN results

I have these commands in a Dockerfile: RUN apt-get -y update #1 RUN apt-get -y install sudo #2 RUN sudo apt-get -y update #3 RUN sudo apt-get -y upgrade #4 RUN sudo apt-get install -y sqlite3 libsqlite3-dev #5 It looks as though Docker cannot cache line #3 or #4 Is there a way I can […]

Installing specific version of docker

I need instructions on how to install a specific version of docker (docker-engine) and docker-compose. Docker version must be 1.11.2. Docker-compose version must be 1.8.1. I’ve googled and when I trying to install one of them, e.g. docker 1.11.2, then docker compose. And after this docker updating to latest version

Ubuntu docker image doesn't contain any /dev/sdX block devices?

On normal linux machine or VM, “ls /dev” will show a lot of sdX or hdX hard disk information. But today I just tried latest docker and ubuntu image. ls shows this: console core fd full mqueue null ptmx pts random shm stderr stdin stdout tty urandom zero I don’t see anything called sdX or […]

Dokku/Docker, how to access file in file system of running container?

Previously, to access a file in a running dokku instance I would run: docker ps to get the container ID followed by ls /var/lib/docker/aufs/diff/<container-id>/app/… note: I’m just using ‘ls’ as an example command. I ultimately want to reference a particular file. This must have changed, as the container ID is no longer accessible via this […]

I've started my Docker container but it is not staying up

After creating container, I check with sudo docker ps and it shows like the following image. Then I check with sudo docker ps -a and it shows it exited 36 seconds ago. This is the code of my Dockerfile: FROM ubuntu:14.04 MAINTAINER srini <srinivasanacg@gmail.com> RUN apt-get update RUN apt-get install -y apache2 RUN mkdir /var/lock/apache2 […]

Create Docker image from existing Ubuntu + App

I installed Moodle (eLearning PHP based app, but it could be any app) locally on Ubuntu and would like to package it as Docker image/container. There were whole bunch of installations and configurations done. I’d like to package all that so that I can deploy to some Docker enabled hosting service, such as Digital Ocean […]

Uninstall applications within docker?

I am using docker to build and run a set of services. For one of these, I need to install a number of packages in order to complete an internal (gulp.js) build process, but they aren’t necessary in the final docker image. It seems as though I should uninstall them while building the docker image, […]

Docker Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Ubuntu

I was playing with docker and mounted my local mysql to a docker container and connected MySql-Workbench so I could view the DB (experimenting) here is the command I ran. docker run -d –name alldb-mysql -v /var/lib/mysql:/var/lib/mysql -e MYSQL_USER=root -e MYSQL_PASSWORD=password -p 3306:3306 mysql:latest after I stopped my container and removed it, I can’t start/restart […]

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