How to install package in docker container

+1 vote

Hi Guys,

I am new in Docker. I want to install some of packages in a docker container. How can I do that?

Thank You

Apr 15, 2020 in Docker by akhtar
• 38,260 points
148,399 views

1 answer to this question.

+1 vote
Best answer

Hi@akhtar,

To install packages in a docker container, the packages should be defined in the Dockerfile.

If you want to install packages in the Container, use the RUN statement followed by exact download command .

$ RUN pip install <package name > //IN Windows
$ RUN apt-get install <package name > //in Ubuntu
$ RUN yum install <package name> //CentOS/RHEL

You can update the Dockerfile with latest list of packages at anytime and build again to create new image out of it.

Hope this will help.

answered Apr 15, 2020 by MD
• 95,460 points

selected Nov 25, 2020 by akhtar

Related Questions In Docker

0 votes
1 answer

How to install telnet in Docker for Windows 10?

If you are trying to telnet in ...READ MORE

answered Aug 28, 2018 in Docker by Tyrion anex
• 8,700 points
3,721 views
0 votes
1 answer

How to create a container and run images in docker?

Look for what all images you have ...READ MORE

answered Feb 23, 2019 in Docker by Kalgi
• 52,350 points
2,417 views
0 votes
1 answer

How to Backup, Restore or Migrate data volumes in a docker container?

Steps to Backup a container 1)     ...READ MORE

answered Jul 3, 2019 in Docker by Sirajul
• 59,230 points
14,413 views
+2 votes
1 answer

How to link one running container with other running container in docker.

Hi @Yuvraj! Yes, this is possible. You can ...READ MORE

answered Dec 16, 2019 in Docker by Kalgi
• 52,350 points
2,377 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,850 views
0 votes
1 answer

How can I install systemctl tool in Docker container?

Hi@akhtar, In docker container if you want to ...READ MORE

answered Feb 5, 2020 in Docker by MD
• 95,460 points
20,523 views
0 votes
1 answer

How to install zabbix in docker?

Hi@akhtar, In your Zabbix server, create a folder ...READ MORE

answered Aug 24, 2020 in Docker by MD
• 95,460 points
4,501 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP