[GH-ISSUE #2382] xu-cheng/latex-action@v3 calls docker and volumes aren't properly mapped #1094

Closed
opened 2026-03-01 21:48:50 +03:00 by kerem · 3 comments
Owner

Originally created by @virzak on GitHub (Jul 1, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2382

Bug report info

act version:            0.2.64
GOOS:                   windows
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        \\.\pipe\docker_engine(broken)
Config files:
        C:\Users\virzak\AppData\Local\act\actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
                -P windows-latest=-self-hosted
                --artifact-server-path C:/TMP/artifacts
                --use-new-action-cache
                --env ACTIONS_CACHE_URL=http://127.0.0.1:8080/
                --env ACTIONS_RUNTIME_URL=http://127.0.0.1:8080/
                --env ACTIONS_RUNTIME_TOKEN=token
                --env ACT_CACHE_AUTH_KEY=token
Build info:
        Go version:            go1.21.11
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.64 -X main.commit=aa54ea933591a57d1179c2691a57f2017aa855e5 -X main.date=2024-07-01T02:21:46Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 windows
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         aa54ea933591a57d1179c2691a57f2017aa855e5
                vcs.time:             2024-07-01T02:21:27Z
                vcs.modified:         false
Docker Engine:
        Engine version:        5.1.1
        Engine runtime:        crun
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlay
        Registry URI:
        OS:                    fedora
        OS type:               linux
        OS version:            40
        OS arch:               amd64
        OS kernel:             5.15.153.1-microsoft-standard-WSL2
        OS CPU:                16
        OS memory:             30982 MB
        Security options:
                name=seccomp,profile=default
                name=rootless

Command used with act

act

Describe issue

An action calls docker inside its script. That results in a situation where there is a host, act container and action container.
github.com/xu-cheng/latex-action@1ccd8e9a1b/action.sh (L56)

It also maps volumes from the act container to the action container, which is apparently impossible.

Is there a common solution to these types of actions?

https://github.com/george-lim/resume

Workflow content

name: CI

on:
  push:
    branches: main
  pull_request:
    branches: main
  workflow_dispatch:

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: xu-cheng/latex-action@v3
        with:
          root_file: resume.tex
      - uses: actions/upload-artifact@v4
        with:
          name: Resume
          path: resume.pdf

Relevant log output

https://pastebin.com/Cq0p2ptu

Additional information

No response

Originally created by @virzak on GitHub (Jul 1, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2382 ### Bug report info ```plain text act version: 0.2.64 GOOS: windows GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is not set Sockets found: \\.\pipe\docker_engine(broken) Config files: C:\Users\virzak\AppData\Local\act\actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 -P windows-latest=-self-hosted --artifact-server-path C:/TMP/artifacts --use-new-action-cache --env ACTIONS_CACHE_URL=http://127.0.0.1:8080/ --env ACTIONS_RUNTIME_URL=http://127.0.0.1:8080/ --env ACTIONS_RUNTIME_TOKEN=token --env ACT_CACHE_AUTH_KEY=token Build info: Go version: go1.21.11 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -s -w -X main.version=0.2.64 -X main.commit=aa54ea933591a57d1179c2691a57f2017aa855e5 -X main.date=2024-07-01T02:21:46Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: windows GOAMD64: v1 vcs: git vcs.revision: aa54ea933591a57d1179c2691a57f2017aa855e5 vcs.time: 2024-07-01T02:21:27Z vcs.modified: false Docker Engine: Engine version: 5.1.1 Engine runtime: crun Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay Registry URI: OS: fedora OS type: linux OS version: 40 OS arch: amd64 OS kernel: 5.15.153.1-microsoft-standard-WSL2 OS CPU: 16 OS memory: 30982 MB Security options: name=seccomp,profile=default name=rootless ``` ### Command used with act ```sh act ``` ### Describe issue An action calls `docker` inside its script. That results in a situation where there is a host, act container and action container. https://github.com/xu-cheng/latex-action/blob/1ccd8e9a1ba76e30b547a1baf0e9c6d5ca33aea3/action.sh#L56 It also maps volumes from the act container to the action container, which is apparently [impossible](https://stackoverflow.com/questions/31381322/docker-in-docker-cannot-mount-volume). Is there a common solution to these types of actions? ### Link to GitHub repository https://github.com/george-lim/resume ### Workflow content ```yml name: CI on: push: branches: main pull_request: branches: main workflow_dispatch: jobs: build: name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: xu-cheng/latex-action@v3 with: root_file: resume.tex - uses: actions/upload-artifact@v4 with: name: Resume path: resume.pdf ``` ### Relevant log output ```sh https://pastebin.com/Cq0p2ptu ``` ### Additional information _No response_
kerem 2026-03-01 21:48:50 +03:00
Author
Owner

@ChristopherHX commented on GitHub (Jul 1, 2024):

Technically for act you could try

  • open wsl with docker desktop integration / ubuntu virtual machine with docker engine (required for non linux systems)
    • maybe you could use the docker dind image instead of a vm / wsl
  • switch to the linux shell
  • then tell act to not spawn a container e.g. -P ubuntu-latest=-self-hosted (yes I added it some years ago)
  • Look at the result, didn't do this myself

At some point I would ask you, is act the right tool for your usecase?
Do you know that actions/runner can be executed like act locally? I have written such a tool (just because I'm able to do it), because act didn't fit my needs for an exact GitHub Actions Clone
A windows host can complicate things if you want to emulate a true linux system, applies for all scenarios wether you use act or not.

<!-- gh-comment-id:2200497305 --> @ChristopherHX commented on GitHub (Jul 1, 2024): Technically for act you could try - open wsl with docker desktop integration / ubuntu virtual machine with docker engine (required for non linux systems) - maybe you could use the docker dind image instead of a vm / wsl - switch to the linux shell - then tell act to not spawn a container e.g. `-P ubuntu-latest=-self-hosted` (yes I added it some years ago) - Look at the result, didn't do this myself At some point I would ask you, is act the right tool for your usecase? Do you know that actions/runner can be executed like act locally? I have written such a tool (just because I'm able to do it), because act didn't fit my needs for an exact GitHub Actions Clone A windows host can complicate things if you want to emulate a true linux system, applies for all scenarios wether you use act or not.
Author
Owner

@virzak commented on GitHub (Jul 2, 2024):

Thanks for your response.

At some point I would ask you, is act the right tool for your usecase?

I was wondering how a case of docker being called from inside the action could be handled. The question was more of a theoretical one; I don't have any urgent need for this. I can also drop to xu-cheng/latex-action@v2 which does work with act.

And it does work on my ubuntu machine with -P ubuntu-latest=-self-hosted

One Idea that I had was to let act know variables like GITHUB_STEP_SUMMARY should point to the host /mnt/something.... That way when an action script calls docker, these variables would be passed down like GITHUB_WORKSPACE gets passed down.
github.com/xu-cheng/latex-action@1ccd8e9a1b/action.sh (L127-L132)

<!-- gh-comment-id:2203940335 --> @virzak commented on GitHub (Jul 2, 2024): Thanks for your response. > At some point I would ask you, is act the right tool for your usecase? I was wondering how a case of docker being called from inside the action could be handled. The question was more of a theoretical one; I don't have any urgent need for this. I can also drop to xu-cheng/latex-action@v2 which [does](https://github.com/nektos/act/issues/1384) work with act. And it does work on my ubuntu machine with `-P ubuntu-latest=-self-hosted` One Idea that I had was to let act know variables like `GITHUB_STEP_SUMMARY` should point to the host `/mnt/something...`. That way when an action script calls docker, these variables would be passed down like `GITHUB_WORKSPACE` gets passed down. https://github.com/xu-cheng/latex-action/blob/1ccd8e9a1ba76e30b547a1baf0e9c6d5ca33aea3/action.sh#L127-L132
Author
Owner

@github-actions[bot] commented on GitHub (Dec 30, 2024):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:2564877086 --> @github-actions[bot] commented on GitHub (Dec 30, 2024): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1094
No description provided.