Skip to content

Commit 93cb067

Browse files
committed
explain how to run linuxfr with rootless containers
1 parent ad98a5f commit 93cb067

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

Docker.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,23 @@ docker-compose run linuxfr.org bin/rails db:setup
2525
Finally, the environment is ready and you can open [http://dlfp.lo](http://dlfp.lo)
2626
in your favorite browser.
2727

28-
Note: to be able to access this URL, you'll need to add the following line
29-
into the `/etc/hosts` file of your machine:
28+
Notes:
29+
30+
1. to be able to access this URL, you'll need to add the following line
31+
into the `/etc/hosts` file of your machine:
32+
33+
```
34+
127.0.0.1 dlfp.lo image.dlfp.lo
35+
```
36+
37+
2. for [rootless containers](https://rootlesscontaine.rs/), you'll need
38+
to allow standard users to listen on ports less than 1024
39+
(this is needed because linuxfr use port 80 and 443):
40+
41+
```sh
42+
sudo sysctl net.ipv4.ip_unprivileged_port_start=80
43+
```
3044

31-
```
32-
127.0.0.1 dlfp.lo image.dlfp.lo
33-
```
3445

3546
Personalize configuration
3647
=========================

docker-compose.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ services:
1010
volumes:
1111
# Share host directories so, the developer can edit them
1212
# and see the result without need to restart the container
13-
- ./app:/linuxfr.org/app
14-
- ./db:/linuxfr.org/db
15-
- ./public:/linuxfr.org/public
16-
- ./test:/linuxfr.org/test
13+
- ./app:/linuxfr.org/app:Z
14+
- ./db:/linuxfr.org/db:Z
15+
- ./public:/linuxfr.org/public:Z
16+
- ./test:/linuxfr.org/test:Z
1717
# uploads are shared with the nginx service
1818
- data-uploads:/linuxfr.org/uploads
1919
tmpfs:
@@ -45,8 +45,8 @@ services:
4545
env_file:
4646
- deployment/default.env
4747
volumes:
48-
- ./deployment/nginx/templates:/etc/nginx/templates
49-
- ./public/fonts:/var/linuxfr/fonts
48+
- ./deployment/nginx/templates:/etc/nginx/templates:Z
49+
- ./public/fonts:/var/linuxfr/fonts:Z
5050
- data-uploads:/var/linuxfr/uploads
5151
ports:
5252
- "80:80"

0 commit comments

Comments
 (0)