0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Docker + Tailscaleがうまくいかない

Posted at

前提

Windows 10 + Docker Desktop 4.43.2

なにに困っていたか

Code Examples を参考にDocker + Tailscale + Nginxの構成を試していたがtailscale-nginxコンテナから名前解決ができない。
ping 100.xx.xx.xx → 通る
ping my-tailscale-node → 通らない

どう解決したか

TS_EXTRA_ARGS--accept-dns=trueを加える
Docs によるとデフォルトでtrueらしい
が、自分の環境では明示的に書き加える必要があった

version: "3.7"

services:
  tailscale-nginx:
    image: tailscale/tailscale:latest
    hostname: tailscale-nginx
    environment:
      - TS_AUTHKEY=tskey-client-notAReal-OAuthClientSecret1Atawk
-     - TS_EXTRA_ARGS=--advertise-tags=tag:container
+     - TS_EXTRA_ARGS=--advertise-tags=tag:container --accept-dns=true
      - TS_STATE_DIR=/var/lib/tailscale
      - TS_USERSPACE=false
    volumes:
      - ${PWD}/tailscale-nginx/state:/var/lib/tailscale
    devices:
      - /dev/net/tun:/dev/net/tun
    cap_add:
      - net_admin
    restart: unless-stopped
  nginx:
    image: nginx
    depends_on:
      - tailscale-nginx
    network_mode: service:tailscale-nginx
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?