Dockerfile to install nginx on Ubuntu

0 votes
Can I install Nginx using a dockerfile? If yes, how?
Jul 23, 2019 in Docker by Greg
3,589 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, 2019 by User101

Related Questions In Docker

0 votes
1 answer

Dockerfile to install apache server and start httpd service on it.

Hey @Kali, That's pretty simple. You could have ...READ MORE

answered Jan 22, 2019 in Docker by Yesha
9,275 views
0 votes
1 answer

Install jenkins using dockerfile on Ubuntu.

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

answered Aug 22, 2019 in Docker by Sirajul
• 55,700 points
1,624 views
0 votes
1 answer

how to install maven,java{jdk}, jenkins.war file & apache tomcat on dockerfile?

Hi, In real scenario docker container is used ...READ MORE

answered May 4 in Docker by MD
• 43,440 points
280 views
0 votes
2 answers

How to install docker-compose on Windows?

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

answered Apr 15, 2019 in Docker by Anudeep
1,794 views
0 votes
1 answer
0 votes
2 answers
0 votes
1 answer

Playbook to install and start nginx on ubuntu

Write your playbook like this: --- - hosts: droplets ...READ MORE

answered Mar 15, 2019 in Ansible by Deep
2,632 views
+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, 2019 in Docker by Vismaya
15,638 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
5,729 views