docker / docker/docker-py

How do I create or run container with (--pull always) option

Open
#2,854 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

Hi guys, I want to run a container that has to pull an image globally instead of locally. Has anyone hadve a solution for this?
the code i wrote for now:
container = client.containers.create(image=image_url, name=name, environment=env, ports=ports, labels={"purpose": "dev"}, restart_policy={"Name":"always"})

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the client.containers.create call shown in the issue and check the docker-py and Docker Engine API documentation for support of the --pull always behavior during container creation or run. Done should be a documented supported approach, or a clear explanation that the option is unavailable and what limitation applies.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.