Dockerfile to install nginx on Ubuntu

0 votes
Can I install Nginx using a dockerfile? If yes, how?
Jul 23 in Docker by Greg
226 views

1 answer to this question.

0 votes

Hey @Greg, this is a simple dockerfile to install nginx:

#This is a sample Image 
FROM ubuntu 
MAINTAINER user@gmail.com 

RUN apt-get update 
RUN apt-get install –y nginx 
CMD [“echo”,”Image created”] 
answered Jul 23 by User101

Related Questions In Docker

0 votes
1 answer
0 votes
1 answer

Install jenkins using dockerfile on Ubuntu.

Here's the dockerfile that you can use: FROM ...READ MORE

answered Aug 22 in Docker by Sirajul
• 31,980 points
203 views
0 votes
2 answers

How to install docker-compose on Windows?

Docker compose is already installed if you ...READ MORE

answered Apr 15 in Docker by Anudeep
639 views
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers
0 votes
1 answer
+2 votes
4 answers

How to install packages inside a docker Ubuntu image?

Execute the update and the install command ...READ MORE

answered Apr 24 in Docker by Vismaya
3,729 views
+1 vote
5 answers

Where are Docker images stored on the host machine?

The contents of the /var/lib/docker directory vary ...READ MORE

answered Jul 18, 2018 in Docker by Kalgi
• 2,620 points
2,407 views