Last active
February 23, 2017 20:30
-
-
Save hagix9/7287649 to your computer and use it in GitHub Desktop.
Dockerでプライベートリポジトリを使う
This file contains 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 -d -p 5000:5000 samalba/docker-registry | |
#実験のために適当なコンテナを起動 | |
docker run -i -t -d --name cent01 centos /bin/bash | |
#起動したコンテナをコミットしてタグ付け | |
docker commit cent01 test1/centos | |
docker tag test1/centos 192.168.10.60:5000/centos_test | |
#コミットしたコンテナをリポジトリにプッシュ | |
docker push 192.168.10.60:5000/centos_test | |
#DockerをインストールしたLAN内の他のパソコンから | |
docker pull 192.168.10.60:5000/centos_test | |
や | |
docker run -i -t 192.168.10.60:5000/centos_test /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment