LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Docker: ubuntu image doesn't keep the packages I installed (https://www.linuxquestions.org/questions/linux-newbie-8/docker-ubuntu-image-doesnt-keep-the-packages-i-installed-4175662467/)

Farron77 10-13-2019 04:59 AM

Docker: ubuntu image doesn't keep the packages I installed
 
Hello everyone,

I am new to docker and it's concepts.

Anyway, I pulled the ubuntu image from docker's online hub via the docker run command.

After it downloaded and it open the bash prompt, I did

apt-get update
apt-get upgrade -y

And I then install some packages. Everything went fine and I then exited the container.

When I return to the ubuntu container to use those programs I've installed, they were not there.

How can I make the ubuntu image keep the packages I install in them?

Thanks

Farron77 10-13-2019 05:43 AM

solved it. I needed to create a Dockerfile with the apt-get statements and the packages I want to install.


All times are GMT -5. The time now is 06:56 PM.