This .gitlab-ci.yml below fails on GitLab after the wget command has finished:
default:
image: ubuntu:latest
stages:
- build-docker-image
build-job:
stage: build-docker-image
script:
- echo "Building Docker image..."
- cat /etc/os-release
- PATH="$PATH:/usr/lib/llvm-18/bin"
- TZ=Antarctica/Troll
- ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
- apt-get update
- apt-get install -y wget
- apt-get install -y lsb-release
- apt-get install -y software-properties-common
- apt-get install -y gnupg
- apt-get install -y bash
- apt-get install -y apt-utils
- yes | bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
- echo "Building Docker image succeeded."
The last lines of the log:
Processing triggers for libc-bin (2.39-0ubuntu8.2) ...
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1
Bizarrely this code works on the Docker Playground (where I need to do sudo docker run -ti --rm ubuntu /bin/bash, but everything else is identical).
I'd appreciate any help. I've sit for many hours on this now.