(Created page with "== Building a Nginx Server ==  You can either build from an image or a Dockerfile <br> === Using a Dockerfile === <code> docker build -f /path/Dockerfile </code> <br>  ==== Us...")  | 
				|||
| Line 24: | Line 24: | ||
=== Creating the Dockerfile ===  | === Creating the Dockerfile ===  | ||
<  | <pre>  | ||
FROM nginx    | FROM nginx    | ||
ADD /var/www/html /usr/share/nginx/html  | ADD /var/www/html /usr/share/nginx/html  | ||
| Line 30: | Line 30: | ||
EXPOSE 80  | EXPOSE 80  | ||
ENTRYPOINT ["nginx"]  | ENTRYPOINT ["nginx"]  | ||
</  | </pre> <br>  | ||
Revision as of 21:14, 24 April 2020
Building a Nginx Server
You can either build from an image or a Dockerfile 
Using a Dockerfile
docker build -f /path/Dockerfile
 
Using an image from Dockerhub
docker build . -t phenixops/phenixapp
Using an image from pivate registry
docker build . -t localhost:5000/phenixapp
Run the app
docker run -p 8080:80 --name phenixapp phenixapp
 
Creating the Dockerfile
FROM nginx ADD /var/www/html /usr/share/nginx/html VOLUME /var/log/nginx/ /var/log/nginx/ EXPOSE 80 ENTRYPOINT ["nginx"]
