podmandocker.adoc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. = Docker or Podman
  2. include::partial$install/container.adoc[]
  3. include::partial$install/container_registries.adoc[]
  4. If you prefer to use docker-compose, then follow the xref:install/docker_compose.adoc[docker-compose] installation instructions>>.
  5. The standard container setup just needs **port 1337** forwarded for web traffic, and a volume **to store the configuration file**. Note that OliveTin containers expect the config to be in `/config/` inside the container, but it doesn't really matter where this directory is mounted from on the host. This documention uses the convention of `/etc/OliveTin` on the host, but `/dockerStuff/OliveTin/` or similar would be fine.
  6. [source, shell]
  7. .Create the container (but don't start it yet)
  8. ....
  9. user@host: mkdir /etc/OliveTin/
  10. user@host: # ie: Your config file is /etc/OliveTin/config.yaml on the host machine. We'll create this in the post-installation step.
  11. user@host: docker pull jamesread/olivetin
  12. user@host: docker create --name olivetin -p 1337:1337 -v /etc/OliveTin/:/config:ro docker.io/jamesread/olivetin
  13. ....
  14. NOTE: The OliveTin container is built using fedora-minimal, which doesn't use customizations that some people may be familiar with from popular projects like LSIO, or debian-based containers. The two top misunderstandings are xref:troubleshooting/puid-pgid.adoc[PUID and PGID are ignored]. Please see the instructions below if you're not familiar with changing users or timezones.
  15. [#container-user]
  16. == Container user
  17. OliveTin does not need to be run as a root, and does not need any special capabilities. If you want to change the user that OliveTin runs as, use `--user` when creating the container. OliveTin ignores xref:troubleshooting/puid-pgid.adoc[PUID and PGID].
  18. [#container-timezone]
  19. == Container timezone
  20. To change the xref:advanced_configuration/timezones.adoc[changing the timezone requires a bound-mount] from the host. Olivetin ignores the TZ variable as it is non-standard.
  21. [#container-healthcheck]
  22. == Container healthcheck
  23. The OliveTin container image includes a Docker `HEALTHCHECK` that requests `http://127.0.0.1:$PORT/readyz` inside the container, with `PORT` defaulting to `1337`. The healthcheck cannot read your `config.yaml`, so if you change the port with `listenAddressSingleHTTPFrontend`, either:
  24. * set the xref:reference/network-ports.adoc[`PORT` environment variable] to the same port (`PORT` also overrides the port in `config.yaml`, so the two always match), or
  25. * override the healthcheck in your deployment (eg: `--health-cmd` with `docker run`, or `healthcheck:` in Docker Compose).
  26. Otherwise the container is reported as `unhealthy`, even though OliveTin is running normally.
  27. include::partial$install/post_container.adoc[]