From ca3e96185c7429d25157318bfce8d1c438ad4aa3 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Thu, 22 Sep 2022 11:12:21 +0200 Subject: [PATCH] feat(dind): add DIND image --- .agola/config.yml | 48 +++++++++++++++++++++++++++++++++++++++++++++++ dind/Dockerfile | 3 +++ 2 files changed, 51 insertions(+) create mode 100644 .agola/config.yml create mode 100644 dind/Dockerfile diff --git a/.agola/config.yml b/.agola/config.yml new file mode 100644 index 0000000..a3e8af8 --- /dev/null +++ b/.agola/config.yml @@ -0,0 +1,48 @@ +version: v0 +runs: + - name: Build + tasks: + - name: Checkout code + runtime: + type: pod + containers: + - image: docker.io/alpine/git + steps: + - clone: + recurse_submodules: true + - save_to_workspace: + contents: + - source_dir: . + dest_dir: . + paths: + - '**' + - name: Build Docker-in-Docker image + runtime: + containers: + - image: gcr.io/kaniko-project/executor:debug + environment: + DOCKERAUTH: + from_variable: dockerauth + shell: /busybox/sh + steps: + - restore_workspace: + dest_dir: . + - run: + name: generate docker config + command: | + cat << EOF > /kaniko/.docker/config.json + { + "auths": { + "https://code.icb4dc0.de": { "auth" : "$DOCKERAUTH" } + } + } + EOF + - run: + name: Build and push image + command: | + /kaniko/executor \ + --destination code.icb4dc0.de/prskr/ci-images/dind:latest \ + --context dir:///root/project/ \ + --dockerfile /root/project/dind/Dockerfile + depends: + - Checkout code \ No newline at end of file diff --git a/dind/Dockerfile b/dind/Dockerfile new file mode 100644 index 0000000..1f45812 --- /dev/null +++ b/dind/Dockerfile @@ -0,0 +1,3 @@ +FROM docker.io/docker:20-dind + +ENTRYPOINT [ "/bin/sh" ] \ No newline at end of file