build context for docker image very large

I have created a couple different directories on my host machine as I try to learn about Docker just to keep my dockerfiles organized. My Dockerfile I just ran looks like this: FROM crystal/centos MAINTAINER crystal ADD ./rpms/test.rpm ./rpms/ RUN yum -y –nogpgcheck localinstall /rpms/test.rpm My actual rpm is only 1 GB. But when I […]

Start full container in Docker?

According to this github issue it should be possible to start a full container with Upstart, cron etc. with Docker 0.6 or later but how do I do that? I was expecting that docker run -t -i ubuntu /sbin/init would work just like lxc-start -n ubuntu /sbin/init and I would get a login screen, but […]

What is the proper command to restart a Dokku app from SSH?

A Rails app I deployed on DigitalOcean using Dokku crashed and started returning 500 errors. How can I restart it without pushing an empty commit?

Why docker container exits immediately

I run a container in the background using docker run -d –name hadoop h_Service it exits quickly. But if I run in the foreground, it works fine. I checked logs using docker logs hadoop there was no error. Any ideas? DOCKERFILE FROM java_ubuntu_new RUN wget RUN dpkg -i cdh4-repository_1.0_all.deb RUN curl -s | […]

What’s the difference between RUN and CMD in a docker file and when should I use one or the other?

I’m confused about when should I use CMD vs RUN. For example, to execute bash/shell commands (i.e. ls -la) I would always use CMD or is there a situation where I would use RUN? Trying to understand the best practices about these two similar Dockerfile directives.

Permission denied on accessing host directory in docker

In short: I am trying to mount a host directory in Docker, but then I can not access it from within the container, even if the access permissions look good. The details: I am doing sudo docker run -i -v /data1/Downloads:/Downloads ubuntu bash and then ls -al It gives me: total 8892 drwxr-xr-x. 23 root […]

Access host database from a docker container

If I have a mysql database running on some host machine, and that host is also running a docker container: How would I access the mysql database from within the docker container that is running on the host?. For instance, is there a way to publish a hosts port to the container (the inverse of […]

docker unauthorized: authentication required – upon push with successful login

While pushing the docker image (after successful login) from my host I am getting “unauthorized: authentication required”. Details below. -bash-4.2# docker login –username=asamba – WARNING: login credentials saved in /root/.docker/config.json *Login Succeeded* -bash-4.2# -bash-4.2# docker push asamba/docker-whale Do you really want to push to public registry? [y/n]: y The push refers to a repository [] […]

Bash Script to execute Docker container operations and extract container IP Address

I am trying to write a Linux bash script that creates and runs docker containers that run a simple python web server, extract the container IP Address and make an HTTP Request to the server through a browser. There seem to be some mistakes in my script and I need help in editing it. I […]

Unable to install docker

I am trying to do hyperledger fabric(setting up the environment) and it required docker. I tried searching the internet of solving to install docker but it was to no avail. The following is the errors encountered when I tried to install dockers. At git bash(git) I tried to use sudo apt-get install docker-engine. But it […]

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