前几天我都是 pull 别人 build 好的 docker image , 那麽如何编辑一个属於自己的 docker image呢?
build image 的两个方法:
一般来说我们并不是创建一个『全新的』image,而是基於一个已经存在的 basic image,比方说 ubuntu / fedora ... etc 往上叠加成属於自己的 image
首先要拥有一个 docker hub 帐号
https://hub.docker.com/signup
在本机login docker hub
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.
create 一个要进行修改的 custome container
docker run -it ubuntu bash
安装 apache package
root@4ed09b9645e0:/# apt-get -yqq update
root@4ed09b9645e0:/# apt-get -y install apache2
选择 apache 时区
提交custome container
docker commit e0090b4914f4 eric211924/apache2
检查创建的 image
docker images eric211924/apache2
提交一个新的 custome container
docker commit -m"a new custom image" -a"Eric Learning" e0090b4914f4 eric211924/apache:webserver
此处的 hash_id 是 container id 而非 image id
查看详细讯息
docker inspect eric211924/apache:webserver
从自己的 image run 一个新的 container
docker run -it eric211924/apache:webserver bash
<<: 初学者跪着学JavaScript Day5 : 资料型别:Primitive values 和 Non-primitive values
>>: [13th][Day10] waiting group
终於写道flow的最後一篇了 尽管我们在自己的开发上,能够高兴地写coroutine和suspend...
今天要解释的是: 如何将下层State提升给上层元件。 但如果没有举例真的太抽象了,所以就乾脆做个功...
@media 基本语法 一样是写在style当中,和CSS一样 @media screen and ...
昨天介绍完如何跳页,今天将会分享如何跳页传值。 成品: 刚执行模拟器的样子 按下 Button 後会...
在开始今天最佳化的主题之前,先对ma讯号的部分做个修正,把里面dropna的部分注解掉,今天发现後面...