# Apache Bench container that uses the base image
ARG UBUNTU_VERSION=22.04
-FROM localhost:5000/vpp-test-base:latest
+FROM localhost:5001/vpp-test-base:latest
# apache2-utils is now installed in the base image
# curl container that uses the base image
ARG UBUNTU_VERSION=22.04
-FROM localhost:5000/vpp-test-base:latest
+FROM localhost:5001/vpp-test-base:latest
# Note: wget and xz-utils are already in the base image
# h2load container that uses the base image
ARG UBUNTU_VERSION=22.04
-FROM localhost:5000/vpp-test-base:latest
+FROM localhost:5001/vpp-test-base:latest
# nghttp2 is now installed in the base image
# nginx container that uses the base image
ARG UBUNTU_VERSION=22.04
-FROM localhost:5000/vpp-test-base:latest
+FROM localhost:5001/vpp-test-base:latest
# nginx is now installed in the base image
ARG UBUNTU_VERSION=22.04
-FROM localhost:5000/vpp-test-base:latest
+FROM localhost:5001/vpp-test-base:latest
COPY resources/nginx/vcl.conf /vcl.conf
COPY resources/nginx/nginx_http3.conf /nginx.conf
# nginx server container that uses the base image
ARG UBUNTU_VERSION=22.04
-FROM localhost:5000/vpp-test-base:latest
+FROM localhost:5001/vpp-test-base:latest
# nginx is now installed in the base image
# VPP container that uses the base image
ARG UBUNTU_VERSION=22.04
-FROM localhost:5000/vpp-test-base:latest
+FROM localhost:5001/vpp-test-base:latest
# We don't need to install these packages as they're in the base image
# Just install anything specific to VPP that isn't in the base
# wrk HTTP benchmarking container that uses the base image
ARG UBUNTU_VERSION=22.04
-FROM localhost:5000/vpp-test-base:latest
+FROM localhost:5001/vpp-test-base:latest
# wrk is installed in the base image
# Registry container name
REGISTRY_NAME="local-registry"
-REGISTRY_PORT=5000
+REGISTRY_PORT=${1:-5001}
# Check if registry container is already running
if docker container inspect "$REGISTRY_NAME" &>/dev/null; then
echo "Adding 'localhost:$REGISTRY_PORT' to insecure-registries in /etc/docker/daemon.json"
echo "You may need to restart Docker for changes to take effect"
echo "Please add the following to /etc/docker/daemon.json:"
- echo '{
- "insecure-registries": ["localhost:5000"]
-}'
+ echo "{
+ \"insecure-registries\": [\"localhost:$REGISTRY_PORT\"]
+}"
fi
else
echo "Creating /etc/docker/daemon.json with insecure-registries configuration"
echo "You may need to restart Docker for changes to take effect"
echo "Please create /etc/docker/daemon.json with the following content:"
- echo '{
- "insecure-registries": ["localhost:5000"]
-}'
+ echo "{
+ \"insecure-registries\": [\"localhost:$REGISTRY_PORT\"]
+}"
fi
fi
"48879",
"4790",
"5000",
+ "5001",
"6633",
"6081",
"53053",
fi
# Set the tag for the base image
-BASE_TAG=${BASE_TAG:-"localhost:5000/vpp-test-base:latest"}
+BASE_TAG=${BASE_TAG:-"localhost:5001/vpp-test-base:latest"}
echo "=== Building base image ==="
# shellcheck disable=2086
DOCKER_BUILD_DIR="/scratch/docker-build"
DOCKER_CACHE_DIR="${DOCKER_BUILD_DIR}/docker_cache"
DOCKER_LOGIN_SCRIPT="/scratch/nomad/.docker-ro/dlogin.sh"
+REGISTRY_PORT=5001
if [ -x "$DOCKER_LOGIN_SCRIPT" ] ; then
$DOCKER_LOGIN_SCRIPT
fi
# Set up the local registry before creating containers
echo "=== Setting up local registry ==="
if [ -x "$(dirname "$0")/../docker/setup-local-registry.sh" ]; then
- "$(dirname "$0")/../docker/setup-local-registry.sh"
+ "$(dirname "$0")/../docker/setup-local-registry.sh" "$REGISTRY_PORT"
else
echo "Warning: setup-local-registry.sh not found or not executable"
echo "Attempting to create and use local registry at localhost:5000"
if ! docker ps | grep -q "local-registry"; then
- docker run -d --restart=always -p 5000:5000 --name local-registry registry:2
+ docker run -d --restart=always -p $REGISTRY_PORT:5000 --name local-registry registry:2
fi
fi
echo "=== Building all containers using build-images.sh ==="
(
# Export necessary environment variables for build-images.sh
- export BASE_TAG="localhost:5000/vpp-test-base:latest"
+ export BASE_TAG="localhost:$REGISTRY_PORT/vpp-test-base:latest"
export OS_ARCH
export UBUNTU_VERSION
export HTTP_PROXY