compose: shared :z on data mounts so kiwix can read its ZIM
maptool's private :Z on ./data recursively relabeled
data/kiwix/wikipedia.zim to maptool's own MCS label, locking the kiwix
container out of it ("Unable to add the ZIM file"), and kiwix's :Z
would do the same back. Both mount the same file, so the label has to
be shared.
This commit is contained in:
1 parent
efddc55ad0
commit
2d6cdeaaf4
1 file changed
+10
-8
+10
-8
@@ -65,12 +65,14 @@ services:
|
|||||||
# happens outside this mount, in the container's own filesystem — a
|
# happens outside this mount, in the container's own filesystem — a
|
||||||
# large country's .osm.pbf plus Planetiler's working set can be
|
# large country's .osm.pbf plus Planetiler's working set can be
|
||||||
# several GB, worth knowing if the host is ever short on space there.
|
# several GB, worth knowing if the host is ever short on space there.
|
||||||
# :Z (not :z — this path is only ever mounted into this one
|
# :z relabels the host directory for SELinux, since Podman on an
|
||||||
# container) relabels the host directory for SELinux, since Podman
|
# SELinux-enforcing host otherwise denies the container write access
|
||||||
# on an SELinux-enforcing host otherwise denies the container write
|
# to a bind-mounted directory regardless of Unix permissions —
|
||||||
# access to a bind-mounted directory regardless of Unix permissions
|
# harmless/ignored on a host without SELinux. Shared :z, not private
|
||||||
# — harmless/ignored on a host without SELinux.
|
# :Z: kiwix below mounts data/kiwix/wikipedia.zim too, and :Z here
|
||||||
- ./data:/app/data:Z
|
# recursively relabels that file to maptool's own private label,
|
||||||
|
# locking kiwix out of it (and kiwix's :Z would do the same back).
|
||||||
|
- ./data:/app/data:z
|
||||||
|
|
||||||
# Fakes a GNSS fix (a loop around Bratislava, see
|
# Fakes a GNSS fix (a loop around Bratislava, see
|
||||||
# bin/gnss_simulator.rb/docs/development.adoc) since there's no real
|
# bin/gnss_simulator.rb/docs/development.adoc) since there's no real
|
||||||
@@ -123,8 +125,8 @@ services:
|
|||||||
# ever talks to this container directly.
|
# ever talks to this container directly.
|
||||||
command: ["--urlRootLocation=/kiwix", "/data/wikipedia.zim"]
|
command: ["--urlRootLocation=/kiwix", "/data/wikipedia.zim"]
|
||||||
volumes:
|
volumes:
|
||||||
# :Z, same SELinux reasoning as maptool's own ./data mount above.
|
# :z, shared for the same reason as maptool's own ./data mount above.
|
||||||
- ./data/kiwix/wikipedia.zim:/data/wikipedia.zim:Z
|
- ./data/kiwix/wikipedia.zim:/data/wikipedia.zim:z
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in new issue
Block a user