[GH-ISSUE #1205] apt-get hangs when installing directly or indirectly keyboard-configuration #667

Closed
opened 2026-03-01 21:45:23 +03:00 by kerem · 8 comments
Owner

Originally created by @Elanis on GitHub (Jun 7, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1205

Bug report info

act version:            0.2.26
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 6
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
Config files:
        /home/elanis/.actrc:
                -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
                -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04
        .actrc:
                -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
                -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04
Docker Engine:
        Engine version:        20.10.17
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Debian GNU/Linux 11 (bullseye)
        OS type:               linux
        OS version:            11
        OS arch:               x86_64
        OS kernel:             5.10.16.3-microsoft-standard-WSL2
        OS CPU:                6
        OS memory:             7936 MB
        Security options:
                name=seccomp,profile=default

Command used with act

act

Describe issue

When running a ubuntu-latest CI which does a apt install, act hangs out when trying to install keyboard-configuration package.

Based on https://github.com/docker/build-push-action/issues/504, I had to set environement variable DEBIAN_FRONTEND=noninteractive to be able to run my apt install completly.

https://github.com/Elanis/web-to-desktop-framework-comparison/

Non-working workflow content

name: Runner

on:
  push:
  workflow_dispatch:

jobs:
  build:
    strategy:
      max-parallel: 1
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
  
    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v3

      - name:  Install
        run:   |
               if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
                    sudo apt update
                    sudo apt install -y libxshmfence1 libglu1 libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 # Electron
                    sudo apt install -y libwebkit2gtk-4.0-37 libstdc++6 # NeutralinoJS
                    sudo apt install -y pkg-config build-essential cmake make mesa-common-dev libglu1-mesa-dev # NodeGUI
               else
                    echo "Nothing to install on $RUNNER_OS"
               fi
        shell: bash

Working workflow content

name: Runner

on:
  push:
  workflow_dispatch:

jobs:
  build:
    strategy:
      max-parallel: 1
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
  
    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v3

      - name:  Install
        run:   |
               if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
                    sudo apt update
                    sudo DEBIAN_FRONTEND=noninteractive apt install -y libxshmfence1 libglu1 libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 # Electron
                    sudo DEBIAN_FRONTEND=noninteractive apt install -y libwebkit2gtk-4.0-37 libstdc++6 # NeutralinoJS
                    sudo DEBIAN_FRONTEND=noninteractive apt install -y pkg-config build-essential cmake make mesa-common-dev libglu1-mesa-dev # NodeGUI
               else
                    echo "Nothing to install on $RUNNER_OS"
               fi
        shell: bash

Relevant log output

(Frozen apt install with language choice)

(https://pastebin.com/ugWdjBZC)

Additional information

No response

Originally created by @Elanis on GitHub (Jun 7, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1205 ### Bug report info ```plain text act version: 0.2.26 GOOS: linux GOARCH: amd64 NumCPU: 6 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /home/elanis/.actrc: -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04 .actrc: -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04 Docker Engine: Engine version: 20.10.17 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Debian GNU/Linux 11 (bullseye) OS type: linux OS version: 11 OS arch: x86_64 OS kernel: 5.10.16.3-microsoft-standard-WSL2 OS CPU: 6 OS memory: 7936 MB Security options: name=seccomp,profile=default ``` ### Command used with act ```sh act ``` ### Describe issue When running a ubuntu-latest CI which does a apt install, act hangs out when trying to install `keyboard-configuration` package. Based on https://github.com/docker/build-push-action/issues/504, I had to set environement variable `DEBIAN_FRONTEND=noninteractive` to be able to run my apt install completly. ### Link to GitHub repository https://github.com/Elanis/web-to-desktop-framework-comparison/ ### Non-working workflow content ```yml name: Runner on: push: workflow_dispatch: jobs: build: strategy: max-parallel: 1 matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Install run: | if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then sudo apt update sudo apt install -y libxshmfence1 libglu1 libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 # Electron sudo apt install -y libwebkit2gtk-4.0-37 libstdc++6 # NeutralinoJS sudo apt install -y pkg-config build-essential cmake make mesa-common-dev libglu1-mesa-dev # NodeGUI else echo "Nothing to install on $RUNNER_OS" fi shell: bash ``` ### Working workflow content ```yml name: Runner on: push: workflow_dispatch: jobs: build: strategy: max-parallel: 1 matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Install run: | if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then sudo apt update sudo DEBIAN_FRONTEND=noninteractive apt install -y libxshmfence1 libglu1 libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 # Electron sudo DEBIAN_FRONTEND=noninteractive apt install -y libwebkit2gtk-4.0-37 libstdc++6 # NeutralinoJS sudo DEBIAN_FRONTEND=noninteractive apt install -y pkg-config build-essential cmake make mesa-common-dev libglu1-mesa-dev # NodeGUI else echo "Nothing to install on $RUNNER_OS" fi shell: bash ``` ### Relevant log output ```sh (Frozen apt install with language choice) ``` (https://pastebin.com/ugWdjBZC) ### Additional information _No response_
kerem 2026-03-01 21:45:23 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Jul 8, 2022):

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

<!-- gh-comment-id:1178393207 --> @github-actions[bot] commented on GitHub (Jul 8, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@alek-kam commented on GitHub (Jul 8, 2022):

Had the same issue.

<!-- gh-comment-id:1178581884 --> @alek-kam commented on GitHub (Jul 8, 2022): Had the same issue.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 8, 2022):

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

<!-- gh-comment-id:1207515870 --> @github-actions[bot] commented on GitHub (Aug 8, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@Elanis commented on GitHub (Aug 8, 2022):

Still a bug

<!-- gh-comment-id:1208072683 --> @Elanis commented on GitHub (Aug 8, 2022): Still a bug
Author
Owner

@KnisterPeter commented on GitHub (Aug 8, 2022):

It's not a bug as it does work like on GitHub actions.
The solution could be found in the referenced issue: https://github.com/docker/build-push-action/issues/504

Also the working workflow in this issue description shows the solution as well.
Do not expect act to run in an interactive terminal.

<!-- gh-comment-id:1208114986 --> @KnisterPeter commented on GitHub (Aug 8, 2022): It's not a bug as it does work like on GitHub actions. The solution could be found in the referenced issue: https://github.com/docker/build-push-action/issues/504 Also the working workflow in this issue description shows the solution as well. Do not expect act to run in an interactive terminal.
Author
Owner

@Elanis commented on GitHub (Aug 8, 2022):

Well, I expected act to work in the same way as Github Actions. Adding a environement variable to fix a local tool issue isn't a solution imo

<!-- gh-comment-id:1208159688 --> @Elanis commented on GitHub (Aug 8, 2022): Well, I expected `act` to work in the same way as Github Actions. Adding a environement variable to fix a local tool issue isn't a solution imo
Author
Owner

@KnisterPeter commented on GitHub (Aug 8, 2022):

I think the main problem might be that in GitHub actions the ubuntu is preconfigured to run non-interactive, while the image used by default in act is missing this. @catthehacker Is that right?

@Elanis You can configure act to use a custom image and map it to ubuntu-latest. Then you can change this without adding ENV-Vars nor act need to be changed. It's just a matter of configuration.

<!-- gh-comment-id:1208168041 --> @KnisterPeter commented on GitHub (Aug 8, 2022): I think the main problem might be that in GitHub actions the ubuntu is preconfigured to run non-interactive, while the image used by default in act is missing this. @catthehacker Is that right? @Elanis [You can configure act to use a custom image and map it to `ubuntu-latest`](https://github.com/nektos/act#runners). Then you can change this without adding ENV-Vars nor act need to be changed. It's just a matter of configuration.
Author
Owner

@ChristopherHX commented on GitHub (Aug 8, 2022):

GitHub actions the ubuntu is preconfigured to run non-interactive

No, actions/runner doesn't allocate a tty.

You can make act do the same just assign false to isTerminal
github.com/nektos/act@92ddcdae09/pkg/container/docker_run.go (L543)
Doing this disables color output of a lot of tools and is an issue in the actions/runner repo for years.

I had fix for that preserved the tty, but tells apt to stop while waiting for input. I abandoned the fix.

<!-- gh-comment-id:1208321993 --> @ChristopherHX commented on GitHub (Aug 8, 2022): > GitHub actions the ubuntu is preconfigured to run non-interactive No, actions/runner doesn't allocate a tty. You can make act do the same just assign false to isTerminal https://github.com/nektos/act/blob/92ddcdae098873ad6d9c05748ce5b6c7be83b811/pkg/container/docker_run.go#L543 Doing this disables color output of a lot of tools and is an issue in the actions/runner repo for years. I had fix for that preserved the tty, but tells apt to stop while waiting for input. I abandoned the fix.
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#667
No description provided.