···11+default:
22+ image: "${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:29.1.1-cli"
33+ services:
44+ - name: "${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:29.1.1-dind"
55+ alias: docker
66+ before_script:
77+ - docker info
88+ - echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
99+ - echo "$CI_DEPENDENCY_PROXY_PASSWORD" | docker login $CI_DEPENDENCY_PROXY_SERVER -u $CI_DEPENDENCY_PROXY_USER --password-stdin
1010+1111+variables:
1212+ # When you use the dind service, you must instruct Docker to talk with
1313+ # the daemon started inside of the service. The daemon is available
1414+ # with a network connection instead of the default
1515+ # /var/run/docker.sock socket. Docker 19.03 does this automatically
1616+ # by setting the DOCKER_HOST in
1717+ # https://github.com/docker-library/docker/blob/d45051476babc297257df490d22cbd806f1b11e4/19.03/docker-entrypoint.sh#L23-L29
1818+ #
1919+ # The 'docker' hostname is the alias of the service container as described at
2020+ # https://docs.gitlab.com/ee/ci/services/#accessing-the-services.
2121+ #
2222+ # Specify to Docker where to create the certificates. Docker
2323+ # creates them automatically on boot, and creates
2424+ # `/certs/client` to share between the service and job
2525+ # container, thanks to volume mount from config.toml
2626+ DOCKER_TLS_CERTDIR: "/certs"
2727+ # Sync with https://tangled.org/tangled.org/core/releases
2828+ KNOT_RELEASE_TAG: v1.11.0-aplha
2929+ # Match the Nest UID/GID of RecapTime.dev's shell account
3030+ UID: "2897"
3131+ GID: "2897"
3232+ # build args-based base images to use Dependency Proxy on CI
3333+ DEPLOY_IMAGE: "$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/alpine:edge"
3434+ BUILDER_IMAGE: "$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/golang:1.24-alpine"
3535+ # enable buildkit
3636+ DOCKER_BUILDKIT: "1"
3737+3838+build:
3939+ stage: build
4040+ script:
4141+ - |
4242+ docker build \
4343+ -t $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG \
4444+ -t $CI_REGISTRY/$CI_PROJECT_PATH:latest \
4545+ --build-arg TAG=$KNOT_RELEASE_TAG \
4646+ --build-arg UID=$UID \
4747+ --build-arg GID=$GID \
4848+ --build-arg DEPLOY_IMAGE=$DEPLOY_IMAGE \
4949+ --build-arg BUILDER_IMAGE=$BUILDER_IMAGE .
5050+ - docker push $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG
5151+ - docker push $CI_REGISTRY/$CI_PROJECT_PATH:latest