
こんな時に、コピーする対応
開発環境を移動
力作のDockerImage をちゃっちゃと利用する。
一からビルドするのは、チョット
現状の確認
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
cturra/ntp latest 25272941f627 2 months ago 14.7MB
REPOSITORY TAG IMAGE ID CREATED SIZE
cturra/ntp latest 25272941f627 2 months ago 14.7MB
Save
REPOSITORY:TAG を指定しないと none:noneとなってしまう
$ docker save cturra/ntp:latest > ntp.tar
Load
(一旦、削除してから確認する)
$ docker image rm cturra/ntp:latest
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
$ docker load < ntp.tar
78a822fe2a2d: Loading layer [==================================================>] 7.622MB/7.622MB
549095f5ef46: Loading layer [==================================================>] 8.272MB/8.272MB
6a18abcbd621: Loading layer [==================================================>] 4.608kB/4.608kB
Loaded image: cturra/ntp:latest
78a822fe2a2d: Loading layer [==================================================>] 7.622MB/7.622MB
549095f5ef46: Loading layer [==================================================>] 8.272MB/8.272MB
6a18abcbd621: Loading layer [==================================================>] 4.608kB/4.608kB
Loaded image: cturra/ntp:latest
確認
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
cturra/ntp latest 25272941f627 2 months ago 14.7MB
REPOSITORY TAG IMAGE ID CREATED SIZE
cturra/ntp latest 25272941f627 2 months ago 14.7MB
サクッと復活しています。