Force pull of container image #271

Closed
opened 2023-07-03 17:09:11 +00:00 by JohnKiller · 2 comments
JohnKiller commented 2023-07-03 17:09:11 +00:00 (Migrated from gitea.com)

Hi, when running a job like this:

jobs:
  compile:
    name: Compile
    runs-on: ubuntu-latest
    container:
      image: myimage:latest

The container image is not pulled if already present. However, since the tag is latest, if I update it there is no way to update the runner with the new one.

GitHub also doesn't support this:

https://github.com/actions/runner/issues/791
https://github.com/actions/runner/issues/1713

I like the solution proposed here: https://github.com/actions/runner/issues/791#issuecomment-1572296966

In the meantime it would be cool if I could just add options: --pull always to the container section, but the option is not supported.

Hi, when running a job like this: ```yaml jobs: compile: name: Compile runs-on: ubuntu-latest container: image: myimage:latest ``` The container image is not pulled if already present. However, since the tag is `latest`, if I update it there is no way to update the runner with the new one. GitHub also doesn't support this: https://github.com/actions/runner/issues/791 https://github.com/actions/runner/issues/1713 I like the solution proposed here: https://github.com/actions/runner/issues/791#issuecomment-1572296966 In the meantime it would be cool if I could just add `options: --pull always` to the `container` section, but the option is not supported.
JohnKiller commented 2023-08-17 06:58:40 +00:00 (Migrated from gitea.com)

Workaround: use the new ForcePull option on the yaml configuration

Workaround: use the new ForcePull option on the yaml configuration
ldicarlo commented 2023-11-02 21:01:56 +00:00 (Migrated from gitea.com)

So in case somebody (like me) arrives here, I think if you are running the act_runner in nixos, you don't have this option.
(https://search.nixos.org/options?channel=23.05&sort=relevance&type=packages&query=gitea-actions-runner).

Faster way is to ssh to your act_runner host (if possible) and docker rmi <your_image>.

So in case somebody (like me) arrives here, I think if you are running the act_runner in nixos, you don't have this option. (https://search.nixos.org/options?channel=23.05&sort=relevance&type=packages&query=gitea-actions-runner). Faster way is to ssh to your act_runner host (if possible) and `docker rmi <your_image>`.
Sign in to join this conversation.