Installing linux packages inside a container. Create a file name
dockerfile and place the following commands in it.
#Create ubuntu as base image
RUN apt-get -y update
RUN apt-get -y install vim
RUN apt-get -y install firefox
RUN apt-get -y install software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get -y install python3.7
Build the image using the following command.
sudo docker build -t username/imagename . (don’t forget the dot)
This command builds the docker image using the dockerfile.
Run the docker image using the following command.
sudo docker run -t username/imagename:tagname
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.