Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amaranese/nginx-docker
https://github.com/amaranese/nginx-docker
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/amaranese/nginx-docker
- Owner: Amaranese
- Created: 2022-01-29T18:47:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-29T18:51:58.000Z (almost 3 years ago)
- Last Synced: 2024-11-11T05:20:43.137Z (2 months ago)
- Language: Dockerfile
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Nginx Server
![nginx](https://www.nginx.com/wp-content/uploads/2018/08/NGINX-logo-rgb-large.png)To build our image, give it a name with the `-t` flag in the below command
## BUILD
```
docker build -t wsimage:v1 .```
- The tag v1 is now added
- Check image is up by running```
docker images
```## RUN
run in the background using the `-d` flag as shown below where `externalIP` is your free port
```
docker run -d --name nginxC1 -v $pwd:/usr/share/nginx/html -p externalIP:80 wsimage:v1
```Example
```
docker run -d --name nginxC2 -v $pwd:/usr/share/nginx/html -p 8880:80 wsimage:v1
```## LOG INTO CONTAINER
```
docker exec -it /bin/bash
```## NOTES
Currently ignoring nginx.conf