1. 程式人生 > >使用Dockerfile建立一個帶 ssh 服務的基礎映象

使用Dockerfile建立一個帶 ssh 服務的基礎映象

[[email protected] ~]# docker tag sshd:dockerfile cakin24/sshd:dockerfile
[[email protected] ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
cakin24/sshd        dockerfile          24641d32c072        10 minutes ago      276MB
sshd                dockerfile          24641d32c072        10 minutes ago      276MB
sshd                ubuntu              ac3169fe4fcf        39 minutes ago      284MB
ubuntu              14.04               d6ed29ffda6b        4 days ago          221MB
tomcat              latest              11df4b40749f        7 days ago          557MB
adminer             <none>              faa9618a39a6        2 weeks ago         58.8MB
mysql               latest              5709795eeffa        2 weeks ago         408MB
hello-world         latest              725dcfab7d63        2 weeks ago         1.84kB
clearlinux          latest              32685d114002        2 weeks ago         62.5MB
alpine              latest              053cde6e8953        2 weeks ago         3.96MB
[
[email protected]
~]# 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: cakin24 Password: Login Succeeded [[email protected] ~]# docker push cakin24/sshd:dockerfile The push refers to a repository [docker.io/cakin24/sshd] af4cabec269c: Pushed 2a9128117487: Pushed 33c1c5d13313: Pushed e202904cecc7: Pushed f7cd00cb3656: Pushed 6e47af92ff32: Pushed 8d3ee96e3a48: Pushed 4e8d2011e2de: Pushed 793453f1c0d4: Pushed 3f02ca67e9bc: Pushed f2bd27f8fa82: Pushed 816745ec0dfa: Pushed d69c6d7735ad: Pushed 59482791e4b2: Mounted from library/ubuntu cd514e6bdf2f: Mounted from library/ubuntu 02323b2bcb37: Mounted from library/ubuntu c088f4b849d4: Pushed c08b59ef4a3d: Mounted from library/ubuntu dockerfile: digest: sha256:36fd196fb97df8fcee3f060f68efbebacac9a061ed388a02e5bccaa7c9c34998 size: 4061