自制基於ubuntu16.04的最小docker鏡像

參考docker官方:https://docs.docker.com/develop/develop-images/baseimages/

安裝

$ sudo apt-get install debootstrap
$ sudo debootstrap xenial xenial > /dev/null
$ sudo tar -C xenial -c . | docker import - xenial

驗證

$ docker images
$ docker run xenial cat /etc/lsb-release

鏡像大小230M

--------------------
root@Ubunt-16:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
xenial latest 75f64e754992 About an hour ago 230MB

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章