How to pass arguments to Shell Script through docker run

I am new to the docker world. I have to invoke a shell script that takes command line arguments through a docker container. Ex: My shell script looks like: #!bin/bash echo $1 Dockerfile looks like this: FROM ubuntu:14.04 COPY ./ / CMD /bin/bash I am not sure how to pass the arguments while running […]

Different env-file but same yml with Docker Compose?

I find it quite common that I have multiple environments (for example test and prod) but the Docker containers that I wish to start are the same in both environments. The only difference is the application configuration which I want to specify using an env-file. Since I have multiple containers and dependencies between them I […]

How to access tomcat running in docker container from browser?

I am running tomcat in my docker container from the Official Repo. docker pull tomcat And as per guidelines stated in the homepage I’ve run the instance and the Tomcat server is started docker run -it –rm -p 8888:8080 tomcat:8.0 And Tomcat server is available on the port 8888. I am able to get the […]

How does one remove an image in Docker?

I’m running Docker under Vagrant under OS X 10.8.4 (Mountain Lion), and whenever I try to delete a saved image, I get an error: $ docker rmi some-image-id 2013/07/15 hh:mm:ss unexpected JSON input According to the rmi help, the proper syntax is docker rmi IMAGE [IMAGE…], and I’m not sure what to make of that. […]

Docker and securing passwords

I’ve been experimenting with Docker recently on building some services to play around with and one thing that keeps nagging me has been putting passwords in a Dockerfile. I’m a developer so storing passwords in source feels like a punch in the face. Should this even be a concern? Are there any good conventions on […]

Docker public registry push fails: Repository does not exist

I’m trying to push my docker image up into the public docker registry: $ docker login Username (binarybana): WARNING: login credentials saved in /home/jknight/.dockercfg. Login Succeeded $ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE binarybana/dev-fedora latest 10c7881fbaca 24 hours ago 1.148 GB binarybana/fedoradev latest 10c7881fbaca 24 hours ago 1.148 GB binarybana/fedora-dev latest 10c7881fbaca […]

How to detect a docker daemon port

I have installed Ubuntu and Docker. I am trying to launch Raik container: $ DOCKER_RIAK_AUTOMATIC_CLUSTERING=1 DOCKER_RAIK_CLUSTER_SIZE=5 DOCKER_RIAK_BACKEND=leveldb make start-cluster ./bin/start and get the error message: It looks like the environment variable DOCKER_HOST has not been set. The Riak cluster cannot be started unless this has been set appropriately. For example: export DOCKER_HOST=”tcp://″ If I set […]

What is the optimal way to run a Node API in Docker on Amazon ECS?

With the advent of docker and scheduling & orchestration services like Amazon’s ECS, I’m trying to determine the optimal way to deploy my Node API. With Docker and ECS aside, I’ve wanted to take advantage of the Node cluster library to gracefully handle crashing the node app in the event of an asynchronous error as […]

How to fix “error in run: Failed to get machine ”boot2docker-vm“: machine does not exist”?

Running boot2docker with the start|info|stop|delete arguments result in an error message: snowch$ boot2docker start error in run: Failed to get machine “boot2docker-vm”: machine does not exist snowch$ boot2docker info error in run: Failed to get machine “boot2docker-vm”: machine does not exist snowch$ boot2docker stop error in run: Failed to get machine “boot2docker-vm”: machine does not […]

how to set ulimit / file descriptor on docker container the image tag is phusion/baseimage-docker

i need to set the file descriptor limit correctly on the docker container i connect to container with ssh ALREADY TRIED: edit limits.conf the container ignore this file upstart procedure found at but this docker image has different kind of init process. (runit) i tried to modify configuration of pam library in /etc/pam.d […]

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