Skip to content

Commit 6194942

Browse files
fix(docker): correct Dockerfile path and image tag in VMs scripts
Fixes two issues reported on PR #445: - VMs/buildDockerImage.sh used `.` as build context with no --file, so running the script from the repo root made buildx look for ./Dockerfile (which does not exist). Switch to explicit --file VMs/Dockerfile and context VMs, matching the paths used by .github/workflows/docker-publish.yml. - VMs/runDockerImage.sh still referenced the old `benchmark` image tag, but the buildx rewrite in c68a62b publishes `owasp/benchmark:latest`. Update the tag so `docker run` finds the freshly-built image. Reported-by: @darkspirit510
1 parent e721461 commit 6194942

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

VMs/buildDockerImage.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ fi
1616

1717
# Build and push a multi-architecture image in one step.
1818
# --push is required because multi-arch manifest lists cannot be loaded into
19-
# the local daemon. The image is pushed directly to Docker Hub.
19+
# the local daemon. The image is pushed directly to Docker Hub, so this
20+
# script requires `docker login` first.
21+
# Run this script from the repository root; paths below mirror the CI
22+
# workflow (.github/workflows/docker-publish.yml).
2023
echo "Building ${IMAGE}:${TAG} for ${PLATFORMS} ..."
2124
docker buildx build \
2225
--platform "$PLATFORMS" \
2326
--tag "${IMAGE}:${TAG}" \
27+
--file VMs/Dockerfile \
2428
--push \
25-
.
29+
VMs
2630

2731
echo "Done. Published ${IMAGE}:${TAG} for ${PLATFORMS}."
2832

VMs/runDockerImage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
docker run -t -i -p 8443:8443 --rm benchmark /bin/bash -c "git pull && ./runRemoteAccessibleBenchmark.sh"
1+
docker run -t -i -p 8443:8443 --rm owasp/benchmark /bin/bash -c "git pull && ./runRemoteAccessibleBenchmark.sh"
22

0 commit comments

Comments
 (0)