Docker is an open platform for developing, shipping, and running applications.
docker run -i -t ubuntu /bin/bash
// Try mean.io stack. Open localhost:8010 docker pull gbevan/meanio docker run -d -p 8010:3000 --name meanio gbevan/meanio // Try Nagios. Open localhost:8120/nagios (user: nagiosadmin pass: admin) docker pull quantumobject/docker-nagios docker run -d -p 8125:25 -p 8120:80 --name nagios quantumobject/docker-nagios // Try Wekan. Open localhost:8040 docker pull mongo docker pull mquandalle/wekan docker run -d --name wekan-db mongo docker run -d --link "wekan-db:db" \ -e "MONGO_URL=mongodb://db" -p 8040:80 mquandalle/wekan
Popular Dockerfiles from hub.docker.com
Documented Dockerfile reference.
// General info man docker // man docker-run docker help // docker help run docker info docker version docker network ls // Images docker images // docker [IMAGE_NAME] docker pull [IMAGE] // docker push [IMAGE] // Containers docker run ... docker exec ... docker ps // docker ps -a, docker ps -l docker stop/start/restart [CONTAINER_ID] docker stats [CONTAINER_ID] docker top [CONTAINER_ID] docker port [CONTAINER_ID] docker inspect [CONTAINER_ID] docker inspect -f "{{ .State.StartedAt }}" [CONTAINER_ID] docker rm [CONTAINER_ID]
FROM nodesource/jessie:0.12.13 # Set the NodeJS environment to dev (vs production) ENV NODE_ENV dev # cache package.json and node_modules to speed up builds ADD package.json /package.json RUN npm install # Add your local files to the image ADD . /path/to/app # Setup the workdir WORKDIR /path/to/app # Optional volume the app VOLUME /path/to/app # Expose ports EXPOSE 3000 CMD ["npm","start"]
Other basic examples: 1.
A simple NodeJS app with redis.
git clone git@github.com:thess-docker/docker-scale-node.git cd docker-scale-node docker-compose up -d ... docker-compose run web env docker-compose logs docker-compose stop docker-compose restart docker-compose down docker-compose up redis
Other useful examples 1, 2, 3, 4
There are known best practices (get a list at examples/tips)
The Docker ecosystem grows exponentially.
you.send('Feedback');
SKGTech.io has a docker image and a docker-compose.yml file now.