https://github.com/jojoee/docker-examples
:tada: A Docker examples
https://github.com/jojoee/docker-examples
docker docker-compose dockerfile node php php-mysql
Last synced: 3 months ago
JSON representation
:tada: A Docker examples
- Host: GitHub
- URL: https://github.com/jojoee/docker-examples
- Owner: jojoee
- Created: 2016-07-13T04:16:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-01-03T07:12:02.000Z (over 6 years ago)
- Last Synced: 2025-03-26T05:51:10.591Z (3 months ago)
- Topics: docker, docker-compose, dockerfile, node, php, php-mysql
- Language: PHP
- Homepage:
- Size: 248 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README-note.md
Awesome Lists containing this project
README
## What does `Docker` do ?
- Packages a service into a standardized unit
- Everything is included to make it run## Benefits of using Docker
- Scale up quickly
- Cross env consistency## Tools & Keywords
- [boot2docker](http://boot2docker.io/): lightweight Linux distribution made to run Docker container
- Application: an application (e.g. apacha, php, mysql, wordpress, laravel)
- Docker Engine: create image and run container
- Docker Compose: for running Docker multiple containers (docker-compose.yml)
- [Docker Cloud](https://cloud.docker.com/): hosted service for building, testing and deploying Docker images to your hosts
- Docker Image: an image contains everything (application) your service needs to run (made by Dockerfile)
- Docker Container: a container is a running instance of an image (docker image)
- Docker Machine: automate container provisioning on your network (like JVM for running Java)
- Docker Client: a program used for play Docker
- Docker Registry: is the store for Docker iamge (hosted registry service)
- [Docker Hub](https://hub.docker.com/): public Docker Registry (like Github or `npm` for node)
- Dockerfile is instructions to build Docker image
- Docker Quickstart terminal app: terminal for running Docker
- Kitematic: Docker GUI
- Oracle VM VirtualBox: used for simulate `Linux` for using with Docker Machine
- Docker Swarm:
- Docker Master:
- Docker Node:
- Kubernetes:
- Mesos:## Cli
``` bash
Basic
$ docker run hello-world
$ docker run busybox echo "Hello world"
$ docker run ubuntu echo "Hello world"
$ docker run docker/whalesay cowsay boo-boo
$ docker run ubuntu apt-get install -y ping & ping google.com -c 2
$ docker build -t jojoee/whalesay ./image/whalesay
$ docker run jojoee/whalesayCli
$ docker-compose build
$ docker-compose build
$ docker-compose up
$ docker-compose up
$ docker-compose up -d
$ docker --help
$ docker rmi
$ docker rmi $(docker images -q -f dangling=true)
$ docker rm -f
$ docker rm -f $(docker ps -aq)
$ docker rm -f & docker-compose build & docker-compose up -d
$ docker-compose up -d
$ docker log
$ docker exec -it /bin/bash
$ docker exec -it ctn_node /bin/bashFor Window guy run this command before start it
$ export COMPOSE_CONVERT_WINDOWS_PATHS=0
```