-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Daemon does not start automatically #10
Comments
Hi @shmatt, I didn't have either of these behaviors. I'm using a standard devcontainer 'mcr.microsoft.com/devcontainers/python:3.11' Have you customized your devcontainer? Were there any warnings in the codespace creation.log? https://docs.github.com/en/codespaces/troubleshooting/github-codespaces-logs |
@nikolarobottesla Below is my devcontainer. No warnings in my creation log. The // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/universal
{
"name": "Default Linux Universal",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
"features": {
"ghcr.io/devcontainers-contrib/features/angular-cli:2": {},
"ghcr.io/devcontainers-contrib/features/ionic-cli:2": {},
"ghcr.io/mikaello/devcontainer-features/kotlinc:1": {},
"ghcr.io/tailscale/codespace/tailscale": {}
},
"containerEnv": {
"ANDROID_SDK_ROOT": "/var/lib/android-sdk"
},
"remoteEnv": {
"PATH": "${containerEnv:PATH}:/var/lib/android-sdk/cmdline-tools/latest/bin:/var/lib/android-sdk/cmdline-tools/tools/bin:/var/lib/android-sdk/platform-tools"
},
"postCreateCommand": "./.devcontainer/postCreateCommand.sh"
} |
@nikolarobottesla The behavior described by @shmatt is the one I have with this even simpler environment: {
"image": "mcr.microsoft.com/devcontainers/universal:linux",
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
],
"runArgs": ["--device=/dev/net/tun"],
"features": {
"ghcr.io/tailscale/codespace/tailscale": {},
}
} The workaround (running the command manually) is indeed working for me as well. |
I just realized that “downgrading” to |
Same issue here, even with |
I think the problem is in |
I‘m running into this issue with the base Debian container.
Could it be that the client does not have access to |
FWIW it works fine for me on:
I don't need to call |
@mausch setting ˋremoteUserˋ as ˋrootˋ is likely why it works for you. That's often not desirable, nor it is the default. |
honestly use this config. Tailscale works fine on Ubuntu 22.04 with ghcr.io/devcontainers/features/sshd:1": {} |
Just wanna say it's really cool we can install tailscale directly into codespaces and devcontainers but that you may have to start the daemon like this should really be mentioned here: https://tailscale.com/kb/1160/github-codespaces/ |
I'm running into the same issue, my dev container config is very simple: // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye",
"runArgs": [
"--device=/dev/net/tun"
],
"features": {
"ghcr.io/devcontainers-contrib/features/tailscale:1": {}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
} I get the following errors: $ tailscale up --accept-routes
failed to connect to local tailscaled; it doesn't appear to be running (sudo systemctl start tailscaled ?) $ sudo /usr/local/sbin/tailscaled --statedir=/workspaces/.tailscale/ --socket=/var/run/tailscale/tailscaled.sock --port=41641
sudo: /usr/local/sbin/tailscaled: command not found |
I'm running into the same issue but the workaround posted by the OP isn't even working for me. Here is the output I get when running the command @shmatt suggested to start the daemon:
Here is my devcontainer.json
|
@Bargs are you running in a codespace or just a devcontainer like in VSCode. I know I ran into the same issue because the "mounts": [
{
"source": "/dev/net/tun",
"target": "/dev/net/tun",
"type": "bind"
}
] to my devcontainer.json and it worked |
Actually @Bargs I just checked and the example in the README.md also works in vscode you have to make sure you add |
After the codespace is built including the feature (which now is available, thank you), I try the following:
However, if I manually enter (copied from
tailscaled-entrypoint.sh
):I can then use
sudo tailscale up --accept-routes
(note the sudo; it doesn't work without it)I suspect that you may be expecting remoteUser to be root (which is not the default for codespaces)?
The text was updated successfully, but these errors were encountered: