Updating custom container example (#260)

* use latest instead of outdated version
* use sudo for package install (required)
* use sudo for package meta data removal (required)
This commit is contained in:
Johannes Nicolai 2021-01-22 01:57:42 +01:00 committed by GitHub
parent 64a1a58acf
commit cbb41cbd18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -468,11 +468,11 @@ The virtual environments from GitHub contain a lot more software packages (diffe
If there is a need to include packages in the runner image for which there is no setup action, then this can be achieved by building a custom container image for the runner. The easiest way is to start with the `summerwind/actions-runner` image and installing the extra dependencies directly in the docker image:
```shell
FROM summerwind/actions-runner:v2.169.1
FROM summerwind/actions-runner:latest
RUN sudo apt update -y \
&& apt install YOUR_PACKAGE
&& rm -rf /var/lib/apt/lists/*
&& sudo apt install YOUR_PACKAGE
&& sudo rm -rf /var/lib/apt/lists/*
```
You can then configure the runner to use a custom docker image by configuring the `image` field of a `Runner` or `RunnerDeployment`: