Last active
August 29, 2015 14:19
-
-
Save maiha/9c74d9f46ee9dc727e6a to your computer and use it in GitHub Desktop.
Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # docker | |
| wget -qO- https://get.docker.com/ | sh | |
| usermod -aG docker maiha | |
| # fig(docker-compose) | |
| curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
| chmod +x /usr/local/bin/docker-compose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker info | |
| docker run hello-world | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker pull ubuntu:latest | |
| docker images |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -it --name ubuntu1 ubuntu /bin/bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -it --name maiha ubuntu /bin/bash | |
| apt-get install zsh | |
| docker commit maiha maiha/zsh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker images | |
| docker run -it --name maiha1 maiha/zsh /bin/zsh | |
| docker exec -it maiha1 /bin/zsh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vi Dockerfile | |
| FROM ubuntu | |
| MAINTAINER maiha <[email protected]> | |
| RUN apt-get install -y zsh | |
| docker build -t maiha/seven:1.0 . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rmq1: | |
| image: rabbitmq:3.5-management | |
| ports: | |
| - "5673:5672" | |
| - "15673:15672" | |
| environment: | |
| RABBITMQ_NODENAME: rmq1 | |
| command: /usr/lib/rabbitmq/lib/rabbitmq_server-3.5.0/sbin/rabbitmq-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu | |
| MAINTAINER maiha <[email protected]> | |
| RUN apt-get update && apt-get install -y \ | |
| ca-certificates \ | |
| curl | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment