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 […]
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?
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 […]
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 –firstname.lastname@example.org 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 [docker.io/asamba/docker-whale] […]
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 […]