From 303b9017de8b51caf03a83fb9ecf907d6319f969 Mon Sep 17 00:00:00 2001 From: Florian Preinstorfer Date: Sat, 3 May 2025 13:56:17 +0200 Subject: [PATCH] Use full image URL in container docs This makes it easy to switch the container runtime from docker <-> podman. --- docs/setup/install/container.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/setup/install/container.md b/docs/setup/install/container.md index 652ce80b..35cb539e 100644 --- a/docs/setup/install/container.md +++ b/docs/setup/install/container.md @@ -7,11 +7,14 @@ **It might be outdated and it might miss necessary steps**. -This documentation has the goal of showing a user how-to set up and run headscale in a container. -[Docker](https://www.docker.com) is used as the reference container implementation, but there is no reason that it -should not work with alternatives like [Podman](https://podman.io). The container image can be found on -[Docker Hub](https://hub.docker.com/r/headscale/headscale) and -[GitHub Container Registry](https://github.com/juanfont/headscale/pkgs/container/headscale). +This documentation has the goal of showing a user how-to set up and run headscale in a container. A container runtime +such as [Docker](https://www.docker.com) or [Podman](https://podman.io) is required. The container image can be found on +[Docker Hub](https://hub.docker.com/r/headscale/headscale) and [GitHub Container +Registry](https://github.com/juanfont/headscale/pkgs/container/headscale). The container image URLs are: + +- [Docker Hub](https://hub.docker.com/r/headscale/headscale): `docker.io/headscale/headscale:` +- [GitHub Container Registry](https://github.com/juanfont/headscale/pkgs/container/headscale): + `ghcr.io/juanfont/headscale:` ## Configure and run headscale @@ -36,7 +39,7 @@ should not work with alternatives like [Podman](https://podman.io). The containe --volume "$(pwd)/run:/var/run/headscale" \ --publish 127.0.0.1:8080:8080 \ --publish 127.0.0.1:9090:9090 \ - headscale/headscale: \ + docker.io/headscale/headscale: \ serve ``` @@ -52,7 +55,7 @@ should not work with alternatives like [Podman](https://podman.io). The containe services: headscale: - image: headscale/headscale: + image: docker.io/headscale/headscale: restart: unless-stopped container_name: headscale ports: @@ -126,11 +129,11 @@ tailscale up --login-server --authkey ## Debugging headscale running in Docker -The `headscale/headscale` Docker container is based on a "distroless" image that does not contain a shell or any other debug tools. If you need to debug headscale running in the Docker container, you can use the `-debug` variant, for example `headscale/headscale:x.x.x-debug`. +The Headscale container image is based on a "distroless" image that does not contain a shell or any other debug tools. If you need to debug headscale running in the Docker container, you can use the `-debug` variant, for example `docker.io/headscale/headscale:x.x.x-debug`. ### Running the debug Docker container -To run the debug Docker container, use the exact same commands as above, but replace `headscale/headscale:x.x.x` with `headscale/headscale:x.x.x-debug` (`x.x.x` is the version of headscale). The two containers are compatible with each other, so you can alternate between them. +To run the debug Docker container, use the exact same commands as above, but replace `docker.io/headscale/headscale:x.x.x` with `docker.io/headscale/headscale:x.x.x-debug` (`x.x.x` is the version of headscale). The two containers are compatible with each other, so you can alternate between them. ### Executing commands in the debug container @@ -141,13 +144,13 @@ Additionally, the debug container includes a minimalist Busybox shell. To launch a shell in the container, use: ```shell -docker run -it headscale/headscale:x.x.x-debug sh +docker run -it docker.io/headscale/headscale:x.x.x-debug sh ``` You can also execute commands directly, such as `ls /ko-app` in this example: ```shell -docker run headscale/headscale:x.x.x-debug ls /ko-app +docker run docker.io/headscale/headscale:x.x.x-debug ls /ko-app ``` Using `docker exec -it` allows you to run commands in an existing container.