[GH-ISSUE #816] Issue: pip is missing from docker image used by act #501

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

Originally created by @cscetbon on GitHub (Sep 14, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/816

System information

  • Operating System:
  • Architecture:
  • Apple M1: yes
  • Docker version: 20.10.8
  • act version: 0.2.24

Expected behaviour

act runs my test and doesn't fail

Actual behaviour

Act fails because the image used doesn't have pip installed (when it's available in the one used by GitHub workflows)

Workflow and/or repository

on: push
name: project

jobs:
  project-tests:
    runs-on: ubuntu-latest
    steps:
    - name: Check out repository
      uses: actions/checkout@v2
    - name: Install system requirements
      run: |
        sudo apt-get update -y
        sudo apt-get -y -qq install --no-install-recommends build-essential
    - name: Copy test config
      run: cp .github/workflows/config.json.sample config.json
    - name: Setup dependencies
      run: pip install --no-cache-dir -e .
    - name: Run tests
      run: |
        mkdir -p test-results
        pip install '.[testing]'
        python -m pytest

act output

WARN  ⚠ You are using Apple M1 chip and you have not specified container architecture, you might encounter issues while running act. If so, try running it with '--container-architecture linux/amd64'. ⚠
[project/project-tests] 🚀  Start image=catthehacker/ubuntu:act-latest
[project/project-tests]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[project/project-tests]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root
[project/project-tests]   🐳  docker cp src=/Users/cscetbon/git/py-project/. dst=/Users/cscetbon/git/py-project
[project/project-tests]   🐳  docker exec cmd=[mkdir -p /Users/cscetbon/git/py-project] user=
[project/project-tests] ⭐  Run Check out repository
[project/project-tests]   ✅  Success - Check out repository
[project/project-tests] ⭐  Run Install system requirements
[project/project-tests]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/cscetbon/git/py-project/workflow/1] user=
Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
Get:2 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease [10.5 kB]
Get:3 https://packages.microsoft.com/ubuntu/20.04/prod focal/main arm64 Packages [13.2 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [101 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages [1234 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal/restricted arm64 Packages [1317 B]
Get:9 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages [11.1 MB]
Get:10 http://ports.ubuntu.com/ubuntu-ports focal/multiverse arm64 Packages [139 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/multiverse arm64 Packages [8495 B]
Get:12 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages [1126 kB]
Get:13 http://ports.ubuntu.com/ubuntu-ports focal-updates/restricted arm64 Packages [3329 B]
Get:14 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages [1004 kB]
Get:15 http://ports.ubuntu.com/ubuntu-ports focal-backports/universe arm64 Packages [6308 B]
Get:16 http://ports.ubuntu.com/ubuntu-ports focal-backports/main arm64 Packages [2680 B]
Get:17 http://ports.ubuntu.com/ubuntu-ports focal-security/universe arm64 Packages [728 kB]
Get:18 http://ports.ubuntu.com/ubuntu-ports focal-security/restricted arm64 Packages [3087 B]
Get:19 http://ports.ubuntu.com/ubuntu-ports focal-security/multiverse arm64 Packages [3243 B]
Get:20 http://ports.ubuntu.com/ubuntu-ports focal-security/main arm64 Packages [715 kB]
Fetched 16.7 MB in 3s (6312 kB/s)
Reading package lists... Done
| debconf: delaying package configuration, since apt-utils is not installed
| Selecting previously unselected package build-essential.
(Reading database ... 26216 files and directories currently installed.)
| Preparing to unpack .../build-essential_12.8ubuntu1.1_arm64.deb ...
| Unpacking build-essential (12.8ubuntu1.1) ...
| Setting up build-essential (12.8ubuntu1.1) ...
[project/project-tests]   ✅  Success - Install system requirements
[project/project-tests] ⭐  Run Copy test config
[project/project-tests]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/cscetbon/git/py-project/workflow/2] user=
[project/project-tests]   ✅  Success - Copy test config
[project/project-tests] ⭐  Run Setup dependencies
[project/project-tests]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/cscetbon/git/py-project/workflow/3] user=
| /Users/cscetbon/git/py-project/workflow/3: line 1: pip: command not found
[project/project-tests]   ❌  Failure - Setup dependencies
Error: exit with `FAILURE`: 127
Originally created by @cscetbon on GitHub (Sep 14, 2021). Original GitHub issue: https://github.com/nektos/act/issues/816 <!-- - Make sure you are able to reproduce it on the [latest version](https://github.com/nektos/act/releases) - Search the existing issues. - Refer to [README](https://github.com/nektos/act/blob/master/README.md). --> ## System information - Operating System: - Architecture: - Apple M1: yes - Docker version: 20.10.8 - `act` version: 0.2.24 ## Expected behaviour act runs my test and doesn't fail ## Actual behaviour Act fails because the image used doesn't have pip installed (when it's available in the one used by GitHub workflows) ## Workflow and/or repository ```none on: push name: project jobs: project-tests: runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v2 - name: Install system requirements run: | sudo apt-get update -y sudo apt-get -y -qq install --no-install-recommends build-essential - name: Copy test config run: cp .github/workflows/config.json.sample config.json - name: Setup dependencies run: pip install --no-cache-dir -e . - name: Run tests run: | mkdir -p test-results pip install '.[testing]' python -m pytest ``` ## `act` output ```none WARN ⚠ You are using Apple M1 chip and you have not specified container architecture, you might encounter issues while running act. If so, try running it with '--container-architecture linux/amd64'. ⚠ [project/project-tests] 🚀 Start image=catthehacker/ubuntu:act-latest [project/project-tests] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [project/project-tests] 🐳 docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root [project/project-tests] 🐳 docker cp src=/Users/cscetbon/git/py-project/. dst=/Users/cscetbon/git/py-project [project/project-tests] 🐳 docker exec cmd=[mkdir -p /Users/cscetbon/git/py-project] user= [project/project-tests] ⭐ Run Check out repository [project/project-tests] ✅ Success - Check out repository [project/project-tests] ⭐ Run Install system requirements [project/project-tests] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/cscetbon/git/py-project/workflow/1] user= Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB] Get:2 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease [10.5 kB] Get:3 https://packages.microsoft.com/ubuntu/20.04/prod focal/main arm64 Packages [13.2 kB] Get:4 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB] Get:5 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [101 kB] Get:6 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB] Get:7 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages [1234 kB] Get:8 http://ports.ubuntu.com/ubuntu-ports focal/restricted arm64 Packages [1317 B] Get:9 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages [11.1 MB] Get:10 http://ports.ubuntu.com/ubuntu-ports focal/multiverse arm64 Packages [139 kB] Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/multiverse arm64 Packages [8495 B] Get:12 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages [1126 kB] Get:13 http://ports.ubuntu.com/ubuntu-ports focal-updates/restricted arm64 Packages [3329 B] Get:14 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages [1004 kB] Get:15 http://ports.ubuntu.com/ubuntu-ports focal-backports/universe arm64 Packages [6308 B] Get:16 http://ports.ubuntu.com/ubuntu-ports focal-backports/main arm64 Packages [2680 B] Get:17 http://ports.ubuntu.com/ubuntu-ports focal-security/universe arm64 Packages [728 kB] Get:18 http://ports.ubuntu.com/ubuntu-ports focal-security/restricted arm64 Packages [3087 B] Get:19 http://ports.ubuntu.com/ubuntu-ports focal-security/multiverse arm64 Packages [3243 B] Get:20 http://ports.ubuntu.com/ubuntu-ports focal-security/main arm64 Packages [715 kB] Fetched 16.7 MB in 3s (6312 kB/s) Reading package lists... Done | debconf: delaying package configuration, since apt-utils is not installed | Selecting previously unselected package build-essential. (Reading database ... 26216 files and directories currently installed.) | Preparing to unpack .../build-essential_12.8ubuntu1.1_arm64.deb ... | Unpacking build-essential (12.8ubuntu1.1) ... | Setting up build-essential (12.8ubuntu1.1) ... [project/project-tests] ✅ Success - Install system requirements [project/project-tests] ⭐ Run Copy test config [project/project-tests] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/cscetbon/git/py-project/workflow/2] user= [project/project-tests] ✅ Success - Copy test config [project/project-tests] ⭐ Run Setup dependencies [project/project-tests] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/cscetbon/git/py-project/workflow/3] user= | /Users/cscetbon/git/py-project/workflow/3: line 1: pip: command not found [project/project-tests] ❌ Failure - Setup dependencies Error: exit with `FAILURE`: 127 ```
kerem 2026-03-01 21:43:57 +03:00
Author
Owner

@catthehacker commented on GitHub (Sep 14, 2021):

pip is not included in small/medium image, please use large image

<!-- gh-comment-id:919295941 --> @catthehacker commented on GitHub (Sep 14, 2021): `pip` is not included in small/medium image, please use large image
Author
Owner

@cscetbon commented on GitHub (Sep 14, 2021):

pip is not included in small/medium image, please use large image

How do you use a large image ?

<!-- gh-comment-id:919384963 --> @cscetbon commented on GitHub (Sep 14, 2021): > `pip` is not included in small/medium image, please use large image How do you use a large image ?
Author
Owner
<!-- gh-comment-id:919810379 --> @catthehacker commented on GitHub (Sep 15, 2021): https://github.com/nektos/act#runners https://github.com/nektos/act#use-an-alternative-runner-image
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#501
No description provided.