question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to not do docker pull?

See original GitHub issue

Thank you 🙇‍♀ for wanting to create a feature in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.

If you have a feature request that is relevant to this repository, the runner, then please include the information below:

Describe the enhancement If I have a local runner and a locally maintained docker image i.e. not stored on a repository, I would like to avoid the “docker pull” step, which then fails.

Code Snippet

name: Self Hosted Tests

on: [push]

jobs:
  integration_tests:
      runs-on: self-hosted
      container:
          image: python3.6:latest
      steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: What java version do we have
        run: java -version

Additional information The image python3.6:latest is in my self-hosted runner’s docker images. It doesn’t exist in DockerHub or any other repository, and I don’t want it to, because it should only ever be run on my self-hosted runner.

NOTE: if the feature request has been agreed upon then the assignee will create an ADR. See docs/adrs/README.md

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:15

github_iconTop GitHub Comments

4reactions
sdarwincommented, Jun 1, 2023

It would be really helpful if these options were supported:

pull: if-not-exists # only pull the image if not found in the local cache
pull: always # always pull the newest version of the image
pull: never # never pull the image and always use the image in the local cache

This allows baking docker images into AMIs, and use if-not-exists so it only downloads when necessary.

3reactions
AllanOricilcommented, Apr 19, 2023

docker does not pull the image again if it exists already: image

But you have to publish the image to a registry so that the pull ackowledges that the image has not changed. To avoid using a remote registry, you can start a local registry in the runner docker run registry, and publish the image to this registry. Then, in the workflow job, write this:

container:
    image: <IP_ADDRESS>:<PORT>/<IMAGE_NAME>:<IMAGE_TAG>
Read more comments on GitHub >

github_iconTop Results From Across the Web

docker pull | Docker Documentation
To pull all images from a repository, provide the -a (or --all-tags ) option when using docker pull . This command pulls all...
Read more >
How do I download Docker images without using the pull ...
Is there a way I can download a Docker image/container using, for example, Firefox and not using the built-in docker-pull . I am...
Read more >
Docker Pull | How Pull Command works in Docker with ...
The 'docker pull' is a Docker command to download a Docker image or a repository locally on the host from a public or...
Read more >
Docker executor | GitLab
Docker · Run CI/CD jobs in Docker containers · Use Docker to build Docker images · Authenticate with registry · Docker Layer Caching....
Read more >
podman-pull
This is a Docker-specific option to disable image verification to a container registry and is not supported by Podman. This option is a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found