Repository navigation
Add script to build and push images without GitHub Actions - #9
Merged
Merged
Conversation
bin/build-and-push.sh builds the images on a workstation the way the build workflow does: from the latest release tag, for linux/amd64 and linux/arm64, with the same tags and labels. The PHP branches and users are read from the workflow of that tag, and the PHP version of each branch is taken from the version label of the newest harbor.flownative.io/docker/php image. Instead of appending the USER statement to the Dockerfile, every variant gets a Dockerfile copy of its own. Without options it only shows the plan; --build builds without pushing, --push builds and pushes after a confirmation. Refs OPS-8S Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On GitHub the matrix comes from the workflow on main, while the code is the one of the latest release tag. The script read the matrix from the workflow of the tag instead, so a version entered on main but not yet tagged was built by the workflow but not by the script. Refs OPS-8S Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kdambekalns
marked this pull request as ready for review
November 5, 2026 18:26
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.
If GitHub Actions is not available,
bin/build-and-push.shbuilds and pushes the images from a workstation the way.github/workflows/docker.build.yamldoes:v*) in a temporarygit worktree, not the working copyorg.opencontainers.image.versionlabel ofharbor.flownative.io/docker/php:<branch>, likeflownative/action-docker-get-labelcomposerandroot(--userpicks one); instead of appendingUSER …to the Dockerfile, each variant gets a Dockerfile copy of its ownlinux/amd64,linux/arm64, the same tags for Docker Hub and Harbor, the same OCI labels;--pullso the newest base image is usedgit fetchfails--buildbuilds without pushing,--pushbuilds and pushes after a confirmation (--yesskips it)Companion of flownative/docker-php#69 and flownative/docker-beach-php#45.
Measured on Apple Silicon with OrbStack,
--build --no-cache: PHP 8.4.27, usercomposer50 s, userroot37 s.Not tested yet: an actual
--push.Refs OPS-8S (https://minka.flownative.com/go/card/OPS-8S)