标签:环境 iges table mpi 中间 cin cal sage amp
$ curl -fsSL https://get.docker.com/ | sh
1.docker run hello-world $ docker run hello-world Cannot connect to the Docker daemon. Is the docker daemon running on this host?
$ sudo usermod -aG docker $(whoami)
$ sudo reboot
注意:需要reboot之后才能使用
zane@zane-V:~$ sudo docker run hello-world Hello from Docker! This message shows that your installation appears to be working correctly.
zane@zane-V:~$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 767a0a0f0bae hello-world "/hello" 30 minutes ago Exited (0) 30 minutes ago silly_mcnulty 9e6a3cb1e18b hello-world "/hello" 33 minutes ago Exited (0) 33 minutes ago tender_kare zane@zane-V:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
zane@zane-V:~$ docker run docker/whalesay cowsay boo Unable to find image ‘docker/whalesay:latest‘ locally latest: Pulling from docker/whalesay e190868d63f8: Pull complete 909cd34c6fd7: Pull complete 0b9bfabab7c1: Pull complete a3ed95caeb02: Pull complete 00bf65475aba: Pull complete c57b6bcc83e3: Pull complete 8978f6879e2f: Pull complete 8eed3712d2cf: Pull complete Digest: sha256:178598e51a26abbc958b8a2e48825c90bc22e641de3d31e18aaf55f3258ba93b Status: Downloaded newer image for docker/whalesay:latest _____ < boo > ----- \ ## . ## ## ## == ## ## ## ## === /""""""""""""""""___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\______/
zane@zane-V:~/mydockerbuild$ docker build -t docker-whale .
zane@zane-V:~/mydockerbuild$ docker build -t docker-whale . Sending build context to Docker daemon 14.85 kB Step 1 : FROM docker/whalesay:latest ---> 6b362a9f73eb Step 2 : RUN apt-get -y update && apt-get install -y fortunes ---> Running in e9dbb3ff0ba2 Ign http://archive.ubuntu.com trusty InRelease Get:1 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB] ....... ....... ....... Setting up fortunes-min (1:1.99.1-7) ... Setting up fortunes (1:1.99.1-7) ... Processing triggers for libc-bin (2.19-0ubuntu6.6) ... ---> 4c9a56721bad Removing intermediate container e9dbb3ff0ba2
Step 3 : CMD /usr/games/fortune -a | cowsay ---> Running in b1aa7efec08e ---> d09756981eeb Removing intermediate container b1aa7efec08e Successfully built d09756981eeb 现在已经创建了一个叫做docker-whale的image。
zane@zane-V:~/mydockerbuild$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE docker-whale latest d09756981eeb 19 minutes ago 275.1 MB hello-world latest c54a2cc56cbb 5 months ago 1.848 kB docker/whalesay latest 6b362a9f73eb 19 months ago 247 MB
zane@zane-V:~/mydockerbuild$ docker run docker-whale ____________________________________ / This is National Non-Dairy Creamer \ Week. / ------------------------------------ \ ## . ## ## ## == ## ## ## ## === /""""""""""""""""___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\______/ zane@zane-V:~/mydockerbuild$ docker run docker-whale _______________________________________ / People who take cold baths never have \ rheumatism, but they have cold baths. / --------------------------------------- \ ## . ## ## ## == ## ## ## ## === /""""""""""""""""___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\______/
zane@zane-V:~/mydockerbuild$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE docker-whale latest d09756981eeb 32 minutes ago 275.1 MB hello-world latest c54a2cc56cbb 5 months ago 1.848 kB docker/whalesay latest 6b362a9f73eb 19 months ago 247 MB
zane@zane-V:~/mydockerbuild$ docker tag d09756981eeb zane0306/docker-whale:latest
zane@zane-V:~/mydockerbuild$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE docker-whale latest d09756981eeb 37 minutes ago 275.1 MB zane0306/docker-whale latest d09756981eeb 37 minutes ago 275.1 MB hello-world latest c54a2cc56cbb 5 months ago 1.848 kB docker/whalesay latest 6b362a9f73eb 19 months ago 247 MB
zane@zane-V:~/mydockerbuild$ docker login Login with your Docker ID to push and pull images from Docker Hub. If you don‘t have a Docker ID, head over to https://hub.docker.com to create one. Username: zane0306 Password: Login Succeeded e.docker push 命令推送自己image到存储库 zane@zane-V:~/mydockerbuild$ docker push zane0306/docker-whale The push refers to a repository [docker.io/zane0306/docker-whale] 9748ff4991ff: Pushed 5f70bf18a086: Mounted from docker/whalesay d061ee1340ec: Mounted from docker/whalesay d511ed9e12e1: Mounted from docker/whalesay 091abc5148e4: Mounted from docker/whalesay b26122d57afa: Mounted from docker/whalesay 37ee47034d9b: Mounted from docker/whalesay 528c8710fd95: Mounted from docker/whalesay 1154ba695078: Mounted from docker/whalesay latest: digest: sha256:62b528c43afd3a2771a167a21ce005a5ee49514109d2af870336f6880ec4eca7 size: 2614
zane@zane-V:~/mydockerbuild$ docker images; REPOSITORY TAG IMAGE ID CREATED SIZE docker-whale latest d09756981eeb 49 minutes ago 275.1 MB zane0306/docker-whale latest d09756981eeb 49 minutes ago 275.1 MB hello-world latest c54a2cc56cbb 5 months ago 1.848 kB docker/whalesay latest 6b362a9f73eb 19 months ago 247 MB zane@zane-V:~/mydockerbuild$ docker rmi -f d09756981eeb Untagged: docker-whale:latest Untagged: zane0306/docker-whale:latest Untagged: zane0306/docker-whale@sha256:62b528c43afd3a2771a167a21ce005a5ee49514109d2af870336f6880ec4eca7 Deleted: sha256:d09756981eebc2a3fa7d200e57be74e89147465969aa92dcbd34b3f541a90219 Deleted: sha256:4c9a56721bad2895ec49a1683737d132f13f2ca99627c5ae3b4368f1b2583919 zane@zane-V:~/mydockerbuild$ docker images; REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest c54a2cc56cbb 5 months ago 1.848 kB docker/whalesay latest 6b362a9f73eb 19 months ago 247 MB
zane@zane-V:~/mydockerbuild$ docker run zane0306/docker-whale Unable to find image ‘zane0306/docker-whale:latest‘ locally latest: Pulling from zane0306/docker-whale e190868d63f8: Already exists 909cd34c6fd7: Already exists 0b9bfabab7c1: Already exists a3ed95caeb02: Already exists 00bf65475aba: Already exists c57b6bcc83e3: Already exists 8978f6879e2f: Already exists 8eed3712d2cf: Already exists c7b22951dde1: Already exists Digest: sha256:62b528c43afd3a2771a167a21ce005a5ee49514109d2af870336f6880ec4eca7 Status: Downloaded newer image for zane0306/docker-whale:latest _________________________________________ / As usual, this being a 1.3.x release, I | haven‘t even compiled this kernel yet. | | So if it works, you should be doubly | | impressed. (Linus Torvalds, announcing | | kernel 1.3.3 on the linux-kernel | \ mailing list.) / ----------------------------------------- \ ## . ## ## ## == ## ## ## ## === /""""""""""""""""___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\______/
标签:环境 iges table mpi 中间 cin cal sage amp
原文地址:http://www.cnblogs.com/Aiapple/p/6956142.html