Skip to content

Draft: 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.

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 with Google search:

    CI_COMMIT_REF_NAME="17.3" IMAGE_NAME="docs:17.3" HUGO_BASEURL="https://docs.gitlab.com/${CI_COMMIT_REF_NAME}" \
    docker buildx build \
              --build-arg VER=${CI_COMMIT_REF_NAME} \
              --build-arg SEARCH_BACKEND="google" \
              --build-arg GOOGLE_SEARCH_KEY=${GOOGLE_SEARCH_KEY} \
              --tag $IMAGE_NAME \
              --file dockerfiles/single.Dockerfile .
  3. Test building the Docker image with Pagefind search:

    CI_COMMIT_REF_NAME="17.3" IMAGE_NAME="docs-archives:17.3" HUGO_BASEURL="https://docs.gitlab.com/${CI_COMMIT_REF_NAME}" \
    docker buildx build \
              --build-arg VER=${CI_COMMIT_REF_NAME} \
              --build-arg SEARCH_BACKEND="pagefind" \
              --tag $IMAGE_NAME \
              --file dockerfiles/single.Dockerfile .

Merge request reports

Loading