Skip to content

Commit 25cae6a

Browse files
committed
Add the assigment to run nginx read only
[refs #d8b6ba92fa7e]
1 parent b8d9813 commit 25cae6a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

nginx/assignment4.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Running nginx read only
2+
* Use your nginx image
3+
* Run the nginx container with the read-only flag
4+
* Use a tmpfs where needed
5+
6+
## The Dockerfile
7+
```
8+
FROM debian:buster-slim
9+
10+
RUN apt-get update \
11+
&& apt-get install -y nginx \
12+
&& rm -rf /var/lib/apt/lists/* \
13+
&& rm /var/log/nginx/access.log \
14+
&& rm /var/log/nginx/error.log \
15+
&& ln -s /dev/stdout /var/log/nginx/access.log \
16+
&& ln -s /dev/stderr /var/log/nginx/error.log
17+
18+
CMD ["/usr/sbin/nginx", "-g", "daemon off;"]
19+
```

0 commit comments

Comments
 (0)