Skip to content

Commit

Permalink
docs(readme): fix container image build cmds: drop / from branch names
Browse files Browse the repository at this point in the history
Previously if you executed the image build commands that use the branch name
to produce container image tag names then you received an error if your branch
name contained a forward slash (/) which is common for people who use VSCode
extensions for managing branches related to pull requests.

The new commands are using `sed` to remove the forward slashes from the branch names
and replace them with underscores (_) so that the container image tags are
valid.

Signed-off-by: Peter Somogyvari <[email protected]>
  • Loading branch information
petermetz committed Nov 30, 2024
1 parent 33b2cf0 commit da5afed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/cactus-example-supply-chain-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ DOCKER_BUILDKIT=1 docker build --file \
./examples/cactus-example-supply-chain-backend/Dockerfile \
. \
--tag scaeb \
--tag ghcr.io/hyperledger/cactus-example-supply-chain-app:$(git describe --contains --all HEAD)_$(git rev-parse --short HEAD)_$(date -u +"%Y-%m-%dT%H-%M-%SZ")
--tag ghcr.io/hyperledger/cactus-example-supply-chain-app:$(git describe --contains --all HEAD | sed -r 's,/,-,g')_$(git rev-parse --short HEAD)_$(date -u +"%Y-%m-%dT%H-%M-%SZ")
# Run the built image with ports mapped to the host machine as you see fit
# The --privileged flag is required because we use Docker-in-Docker for pulling
Expand Down

0 comments on commit da5afed

Please sign in to comment.