Published docker images not works #98

Closed
opened 2025-12-29 01:23:06 +01:00 by adam · 1 comment
Owner

Originally created by @artemklevtsov on GitHub (Jan 8, 2022).

Issue description

Can't get it works with docker images from the Docker Hub.

To Reproduce

$ mkdir config
$ cat  <<EOL > config/config.yaml
server_url: https://example.com
listen_addr: 0.0.0.0:8080
private_key_path: /var/lib/headscale/private.key
unix_socket: /var/run/headscale.sock
ip_prefix: 100.64.0.0/10
log_level: info
disable_check_updates: false
ephemeral_node_inactivity_timeout: 30m
db_type: sqlite3
db_path: /var/lib/headscale/db.sqlite
derp:
  urls:
    - https://controlplane.tailscale.com/derpmap/default
  auto_update_enabled: true
  update_frequency: 24h
dns_config:
  nameservers:
    - 1.1.1.1
    - 8.8.8.8
  domains: []
  magic_dns: false
  #base_domain: unikum.lan
EOL
$ mkdir data
$ touch data/db.sqlite
$ docker run --rm -p 8080:8080 -v $PWD/config:/etc/headscale -v $PWD/data:/var/lib/headscale -e PUID=1000 -e PGID=1000 headscale/headscale:0.11.0 headscale serve
2022/01/08 16:04:03 Error initializing: open /var/lib/headscale/private.key: no such file or directory
$ docker run --rm -p 8080:8080 -v $PWD/config:/etc/headscale -v $PWD/data:/var/lib/headscale -e PUID=1000 -e PGID=1000 jauderho/headscale:v0.12.1 serve
2022-01-08T16:04:41Z INF No private key file at path, creating... path=/var/lib/headscale/private.key
2022/01/08 16:04:41 Error initializing: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

Add info

$ ocker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.7.1-docker)
  compose: Docker Compose (Docker Inc., 2.2.3)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 16
 Server Version: 20.10.12
 Storage Driver: overlay2
  Backing Filesystem: btrfs
  Supports d_type: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 1407cab509ff0d96baa4f0eb6ff9980270e6e620.m
 runc version: v1.0.3-0-gf46b6ba2
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.15.13-zen1-1-zen
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 62.79GiB
 Name: unikum-desktop
 ID: IOSH:44GF:6UH2:UYBK:HFGA:GNSF:ZKE6:WLBT:MUEE:ON2A:ITAM:3HWD
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: artemklevtsov
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Default Address Pools:
   Base: 172.240.0.0/16, Size: 24
Originally created by @artemklevtsov on GitHub (Jan 8, 2022). <!-- If you have a question, please consider using our Discord for asking questions --> **Issue description** Can't get it works with docker images from the Docker Hub. **To Reproduce** <!-- Steps to reproduce the behavior. --> ```bash $ mkdir config $ cat <<EOL > config/config.yaml server_url: https://example.com listen_addr: 0.0.0.0:8080 private_key_path: /var/lib/headscale/private.key unix_socket: /var/run/headscale.sock ip_prefix: 100.64.0.0/10 log_level: info disable_check_updates: false ephemeral_node_inactivity_timeout: 30m db_type: sqlite3 db_path: /var/lib/headscale/db.sqlite derp: urls: - https://controlplane.tailscale.com/derpmap/default auto_update_enabled: true update_frequency: 24h dns_config: nameservers: - 1.1.1.1 - 8.8.8.8 domains: [] magic_dns: false #base_domain: unikum.lan EOL $ mkdir data $ touch data/db.sqlite $ docker run --rm -p 8080:8080 -v $PWD/config:/etc/headscale -v $PWD/data:/var/lib/headscale -e PUID=1000 -e PGID=1000 headscale/headscale:0.11.0 headscale serve 2022/01/08 16:04:03 Error initializing: open /var/lib/headscale/private.key: no such file or directory $ docker run --rm -p 8080:8080 -v $PWD/config:/etc/headscale -v $PWD/data:/var/lib/headscale -e PUID=1000 -e PGID=1000 jauderho/headscale:v0.12.1 serve 2022-01-08T16:04:41Z INF No private key file at path, creating... path=/var/lib/headscale/private.key 2022/01/08 16:04:41 Error initializing: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub ``` **Add info** ```bash $ ocker info Client: Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc., v0.7.1-docker) compose: Docker Compose (Docker Inc., 2.2.3) Server: Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 16 Server Version: 20.10.12 Storage Driver: overlay2 Backing Filesystem: btrfs Supports d_type: true Native Overlay Diff: false userxattr: false Logging Driver: json-file Cgroup Driver: systemd Cgroup Version: 2 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc Default Runtime: runc Init Binary: docker-init containerd version: 1407cab509ff0d96baa4f0eb6ff9980270e6e620.m runc version: v1.0.3-0-gf46b6ba2 init version: de40ad0 Security Options: seccomp Profile: default cgroupns Kernel Version: 5.15.13-zen1-1-zen Operating System: Arch Linux OSType: linux Architecture: x86_64 CPUs: 16 Total Memory: 62.79GiB Name: unikum-desktop ID: IOSH:44GF:6UH2:UYBK:HFGA:GNSF:ZKE6:WLBT:MUEE:ON2A:ITAM:3HWD Docker Root Dir: /var/lib/docker Debug Mode: false Username: artemklevtsov Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false Default Address Pools: Base: 172.240.0.0/16, Size: 24 ```
adam added the bug label 2025-12-29 01:23:06 +01:00
adam closed this issue 2025-12-29 01:23:06 +01:00
Author
Owner

@artemklevtsov commented on GitHub (Jan 9, 2022):

Seems should be fixed in #253.

@artemklevtsov commented on GitHub (Jan 9, 2022): Seems should be fixed in #253.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#98