Skip to content

Instantly share code, notes, and snippets.

@nekufa
Created October 29, 2021 12:08
Show Gist options
  • Save nekufa/637869bf4b2641e90c5b2a96a77b1292 to your computer and use it in GitHub Desktop.
Save nekufa/637869bf4b2641e90c5b2a96a77b1292 to your computer and use it in GitHub Desktop.
cartrdige gitlab builder using dind
image: ubuntu:focal
variables:
DEBIAN_FRONTEND: noninteractive
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
IMAGE_LATEST: $REGISTRY_PATH/$CI_PROJECT_NAME:latest
IMAGE_TAG: $REGISTRY_PATH/$CI_PROJECT_NAME:$CI_COMMIT_TAG
stages:
- build
build-image:
stage: build
only:
- tags
services:
- name: docker:18.09.7-dind
script:
- apt-get update
- apt-get install -yq tzdata curl docker.io
- curl -L https://tarantool.io/installer.sh | bash -s -- --repo-only
- apt-get install -y tarantool cartridge-cli
- CARTRIDGE_TEMPDIR=. cartridge pack docker --tag $IMAGE_TAG --verbose
- docker tag $IMAGE_TAG $IMAGE_LATEST
- docker push $IMAGE_TAG
- docker push $IMAGE_LATEST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment