我使用 gitlab ci 构建 docker 映像,我想安装 python。当我构建时,以下是我的 gitlab-ci.yml:
image: docker:stable
stages:
- test
- build
before-script:
- apt install -y python-dev python pip
test1:
stage: test
script:
...
- pytest
build:
stage: build
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
但我的工作失败了
/bin/sh: eval: line : apt: not found
ERROR: Job failed: exit code 127
我也尝试过 apt-get install 但结果是一样的。
我如何安装python?