4
0

containerInstallPackages.adoc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. [#container-dnf]
  2. = Installing extra container packages
  3. The official OliveTin container image is based on Fedora Linux. Fedora has shown to offer a great mix of stability and support over two decades. The base container image for OliveTin is relatively lightweight, with not many tools installed by default. This keeps the download size small, but you may want to add additional packages.
  4. == Quickstart - using DNF to install additional packages
  5. You can of course create your own container image, but this is probably a lot of work for new users, or people who just want a few extra packages/commands. Instead of creating a whole new container image, you can simply run `microdnf` (the Fodora package manager) to install more commands.
  6. . Start the OliveTin container using one of the methods shown in the xref:install/container.adoc[container installation instructions].
  7. . Then, on the same host that is running the container, spawn a root shell inside the OliveTin container, like this;
  8. +
  9. ----
  10. user@host: docker exec -it olivetin -u root /bin/bash
  11. [root@019d08ef95bd /]#
  12. ----
  13. +
  14. The important thing here is passing `-u root`. By default, OliveTin does not run as root.
  15. . Once you have a root shell in OliveTin, you can use the Fedora package manager - `microdnf` to install things that you might need. If you are used to Debian's `apt-get` tool, it works in a very similar way;
  16. +
  17. ----
  18. [root@019d08ef95bd /]# microdnf install -y nc
  19. ----
  20. +
  21. Note that if you upgrade the OliveTin container image, you will need to reinstall these packages.
  22. +
  23. Once you have finished installing these packages, just exit the root shell using `exit`. You don't need to restart the container - and OliveTin does not need to run as root to use most commands.
  24. == See also
  25. * link:https://hub.docker.com/r/jamesread/olivetin[OliveTin container on Docker Hub]
  26. * xref:install/container.adoc[Installing using a container]
  27. * xref:install/docker_compose.adoc[Installing using docker compose]
  28. * xref:install/helm.adoc[Installing on Kubernetes with Helm]
  29. * xref:install/k8s.adoc[Installing on Kubernetes (manually)]