tailscale / tailscale/github-action

Trouble with action when using within docker container - Solved?

Open
#226 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
938
Forks
137
PR merge metrics
No merged PRs in 30d

Description

Hello,
Given:

jobs:
  tests:
    timeout-minutes: 30
    runs-on: ubuntu-latest

    container: 
      image: ghcr.io/some-image:latest
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock

    steps:
    - name: Checkout repository
      uses: actions/checkout@v4

    - name: Tailscale
      timeout-minutes: 5
      uses: tailscale/github-action@v4
      with:
        oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
        oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
        tags: tag:test-bench

We get this error in a CI:
Error: tailscaled daemon did not become ready within timeout, last error: tailscale failed with exit code 1

Digging, I realized the action try to start the application via systemctl? Or at least when I tried used v3 (which gave me the hint). Which does not work on 'default' docker images.

So - I saw somewhere to add options: --privileged as such

    container: 
      image: ghcr.io/some-image:latest
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock
      options: --privileged

Now it works!

My issue is there was no doc I found explaining this issue - even the Tailscail AI was of no use. So I guess my issue is can you document this somewhere?

Please enlighten me if the documentation is somewhere or if there's a better solution.

Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the repository's current documentation and the container workflow shown in the issue. Confirm when the Tailscale action requires a privileged container, then document the relevant configuration and verify that the example addresses the reported daemon startup failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, github-actions
Domain
ci-cd, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.