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 […]

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 […]

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 http://archive.cloudera.com/cdh4/one-click-install/precise/amd64/cdh4-repository_1.0_all.deb RUN dpkg -i cdh4-repository_1.0_all.deb RUN curl -s http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh/archive.key | […]

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.

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 […]

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 […]

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 […]

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 […]