Skip to content

Commit 1f5e773

Browse files
committed
docker: Add SELinux labels for rootless Podman compatibility
Volumes need to be properly re-labelled on rootless Podman setups on Fedora. The SELinux re-labeling bind mount option is ignored on platforms without SELinux, so it shouldn't break existing setups.
1 parent f71a9f0 commit 1f5e773

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docker-compose.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ services:
66
command: -c /etc/chirpstack
77
restart: unless-stopped
88
volumes:
9-
- ./configuration/chirpstack:/etc/chirpstack
10-
- ./lorawan-devices:/opt/lorawan-devices
9+
- ./configuration/chirpstack:/etc/chirpstack:z
10+
- ./lorawan-devices:/opt/lorawan-devices:z
1111
depends_on:
1212
- postgres
1313
- mosquitto
@@ -25,7 +25,7 @@ services:
2525
ports:
2626
- 1700:1700/udp
2727
volumes:
28-
- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
28+
- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge:z
2929
environment:
3030
- INTEGRATION__MQTT__EVENT_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}
3131
- INTEGRATION__MQTT__STATE_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/state/{{ .StateType }}
@@ -40,7 +40,7 @@ services:
4040
ports:
4141
- 3001:3001
4242
volumes:
43-
- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
43+
- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge:z
4444
depends_on:
4545
- mosquitto
4646

@@ -57,24 +57,24 @@ services:
5757
image: postgres:14-alpine
5858
restart: unless-stopped
5959
volumes:
60-
- ./configuration/postgresql/initdb:/docker-entrypoint-initdb.d
61-
- postgresqldata:/var/lib/postgresql/data
60+
- ./configuration/postgresql/initdb:/docker-entrypoint-initdb.d:Z
61+
- postgresqldata:/var/lib/postgresql/data:Z
6262
environment:
6363
- POSTGRES_PASSWORD=root
6464

6565
redis:
6666
image: redis:7-alpine
6767
restart: unless-stopped
6868
volumes:
69-
- redisdata:/data
69+
- redisdata:/data:z
7070

7171
mosquitto:
7272
image: eclipse-mosquitto:2
7373
restart: unless-stopped
7474
ports:
7575
- 1883:1883
7676
volumes:
77-
- ./configuration/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
77+
- ./configuration/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf:Z
7878

7979
volumes:
8080
postgresqldata:

0 commit comments

Comments
 (0)