diff --git a/Containerfile b/Containerfile index 5b46655..fed7035 100644 --- a/Containerfile +++ b/Containerfile @@ -45,6 +45,8 @@ ENTRYPOINT /lib/systemd/systemd # Gitlab-runner configuration options, may be freely overridden at # container image build time. ARG DEFAULT_JOB_IMAGE=registry.fedoraproject.org/fedora-minimal:latest +# Allow image-builders to override the Gitlab URL +ARG GITLAB_URL=https://gitlab.com/ # Run nested containers in --privileged mode - required to allow building # container images using podman or buildah. Otherwise may be set 'false'. ARG NESTED_PRIVILEGED=true @@ -59,7 +61,7 @@ LABEL register="podman run -it --rm \ --secret=REGISTRATION_TOKEN,type=env \ -v ./config.toml:/etc/gitlab-runner/config.toml:Z \ -e REGISTER_NON_INTERACTIVE=true \ - -e CI_SERVER_URL=https://gitlab.com/ \ + -e CI_SERVER_URL=${GITLAB_URL}} \ -e RUNNER_NAME=pipglr \ -e RUNNER_EXECUTOR=docker \ -e RUNNER_SHELL=bash \ diff --git a/README.md b/README.md index c338006..b50456f 100644 --- a/README.md +++ b/README.md @@ -242,6 +242,8 @@ Several build arguments are available to control the output image: `--platform` build argument, it will be set automatically. Note: as of this writing, only `amd64` and `arm64` builds of the gitlab-runner are available. +* `GITLAB_URL` - Defaults to 'https://gitlab.com/' but can be set to point + to a self hosted instance of Gitlab. * `NESTED_PRIVILEGED` - Defaults to 'true', may be set 'false' to prevent nested containers running in `--privileged` mode. This will affect the ability to build container images in CI jobs using tools like