Skip to content

Add dockerfile for archives

What does this MR do and why?

Adds a single.dockerfile to be used when we build the archives.

For #35 (closed).

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.

  2. Test building the Docker image:

    # Set environment variables
    export HUGO_VERSION="0.139.4"
    export COREPACK_VERSION="0.30.0"
    export CI_COMMIT_REF_NAME="17.6"
    export IMAGE_NAME="docs:17.6"
    
    # Run the docker build command
    docker build \
     --build-arg HUGO_VERSION=${HUGO_VERSION} \
     --build-arg COREPACK_VERSION=${COREPACK_VERSION} \
     --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} \
     --tag ${IMAGE_NAME} \
     --file dockerfiles/single.Dockerfile \
     .
  3. Check that everything works (versioned docs, search, etc.):

    docker run -it --rm -p 4000:4000 docs:17.6
Edited by Achilleas Pipinellis

Merge request reports

Loading