diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bba0d27..aa07c70 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,22 @@ -build_image: - image: docker:git - services: - - docker:dind - before_script: - - docker run --privileged linuxkit/binfmt:v0.8 - - docker run -d --privileged -p 1234:1234 --name buildkit moby/buildkit:latest --addr tcp://0.0.0.0:1234 --oci-worker-platform linux/amd64 --oci-worker-platform linux/arm64 - - docker cp buildkit:/usr/bin/buildctl /usr/bin/ - - export BUILDKIT_HOST=tcp://0.0.0.0:1234 - script: - - sh build-images.sh - when: always +stages: +- build + +buildkitd: + stage: build + + services: + - alias: buildkitd + name: moby/buildkit:rootless + command: + - "--oci-worker-no-process-sandbox" + - "--addr" + - "tcp://0.0.0.0:1234" + variables: + BUILDKIT_HOST: tcp://buildkitd:1234 + + image: + name: moby/buildkit:rootless + entrypoint: [ "sh", "-c" ] + script: + - sh build-images.sh + when: always