operations.docker: add compose, login/logout, and build operations#1675
Open
wowi42 wants to merge 8 commits intopyinfra-dev:3.xfrom
Open
operations.docker: add compose, login/logout, and build operations#1675wowi42 wants to merge 8 commits intopyinfra-dev:3.xfrom
wowi42 wants to merge 8 commits intopyinfra-dev:3.xfrom
Conversation
# Conflicts: # src/pyinfra/operations/docker.py
This was referenced Apr 20, 2026
Collaborator
|
I honestly disagree that adding all 3 (compose, login/logout, build) in 1 PR makes it easier to review. I might be dumb, but I like focused PRs that are as small as possible so the context is manageable. Could you split it into 3 PR @wowi42 ? I love the additions btw! |
This was referenced Apr 24, 2026
Collaborator
Author
|
Split this PR into three focused PRs, each freshly based on current
Happy to close this one in favour of the three above — let me know if you'd prefer to keep it open for context. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DockerImage/DockerAuths-based idempotency) and it's easier to review together.docker.compose: rundocker compose up -d/downagainst an on-host compose file, with support for--project-name,--pull,--build,--force-recreate,--remove-orphans, and-v. Not idempotent from pyinfra's side; Docker's own layer/state handling keeps re-runs cheap.docker.login/docker.logout: idempotent registry auth. Checks${DOCKER_CONFIG:-~/.docker}/config.jsonvia a newDockerAuthsfact;loginpipes the password to--password-stdinand masks it in logs.docker.build: wrapsdocker build(ordocker buildx buildviabuilder=). Supportstags,dockerfile,build_args,labels,target,platform,network,cache_from,secrets,pull,no_cache, and tag-based idempotency (no-op when every declared tag already exists locally, unlessforce=True).Supersedes #1674 and #1673.
3.xat this time)scripts/dev-test.sh)scripts/dev-lint.sh)