Compare commits
2 Commits
c28a3e5397
...
0bc19e6808
Author | SHA1 | Date |
---|---|---|
Jason Zhu | 0bc19e6808 | |
Jason Zhu | 4326bc0085 |
|
@ -0,0 +1,2 @@
|
|||
FROM nginx:latest
|
||||
COPY ./index.html /usr/share/nginx/html/index.html
|
14
README.md
14
README.md
|
@ -0,0 +1,14 @@
|
|||
# README
|
||||
|
||||
This is a practise repo for learning how to run nginx docker for serving:
|
||||
* static content
|
||||
* reverse proxy of other services
|
||||
|
||||
How to run nginx docker container:
|
||||
|
||||
```
|
||||
docker-compose build
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
* As we use docker-compose.yaml, it's easy to build image and spawn up container in this way
|
|
@ -0,0 +1,9 @@
|
|||
services:
|
||||
web:
|
||||
container_name: web
|
||||
hostname: web
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 8085:80
|
|
@ -0,0 +1,13 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Docker Nginx</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2>Hello from Nginx container, Again</h2>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue