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
8,752 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
17,744 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
• 59,090 points
3,373 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, 2020 in Docker by MD
• 95,320 points
1,150 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
3,095 views
+1 vote
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
7,524 views
+3 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
28,036 views
+2 votes
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,680 points
10,358 views