Study/docker

docker container 에 변화들 저장하는 방법

soyeonland 2024. 6. 27. 10:24

<ckarh>
451

You need to commit the changes you make to the container and then run it. Try this:

sudo docker pull ubuntu

sudo docker run ubuntu apt-get install -y ping

container
1c9a27ef1ed1

2. saeve as image (docker commit 은 비추천하는 방법, 급할때만 사용, 다시 되돌리기 어려움.)
https://stackoverflow.com/questions/36826380/docker-how-to-save-running-instance
docker commit

3. build 하기