Trouble with action when using within docker container - Solved?

オープン
#226 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
docker, github-actions

調査の方向性

リポジトリの現在のドキュメントと、issue に示されているコンテナワークフローを確認します。Tailscale action に特権コンテナが必要になる条件を確認し、関連する設定を文書化したうえで、その例によって報告された daemon の起動失敗が解消されることを検証します。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
938
フォーク
137
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tailscale/github-action のほかの issue

tailscale/github-action の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。