From 3066e29a96fa2e4fdd89c0edb493ca9338cba601 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Fri, 28 Oct 2022 23:51:49 +0200 Subject: [PATCH] trying with dind --- .drone.yml | 29 ++++++++++++++++++++++++++--- Dockerfile | 13 +++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml index 259ae9a..0aab44e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,30 @@ name: "drone-dagger-test" steps: - name: "build" - image: harbor.front.kjuulh.io/docker-proxy/library/golang:latest + image: harbor.front.kjuulh.io/docker-proxy/library/docker:dind + environment: + DOCKER_BUILDKIT: 1 commands: - - "go run main.go https://github.com/kpenfound/greetings-api.git" - - "go test ./..." + - "sleep 5" + - docker build -t dagger-test-builder . + + - name: "run-pipeline" + image: harbor.front.kjuulh.io/docker-proxy/library/docker:dind + environment: + DOCKER_BUILDKIT: 1 + depends_on: + - "build" + commands: + - "docker run dagger-test-builder ./dagger 'https://github.com/kpenfound/greetings-api.git'" + +services: + - name: docker + image: docker:dind + privileged: true + volumes: + - name: dockersock + path: /var/run + +volumes: + - name: dockersock + temp: {} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5c4e573 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM harbor.front.kjuulh.io/docker-proxy/library/golang as builder + +WORKDIR /src/builder + +COPY . . + +RUN go build -o dist/dagger main.go + +FROM harbor.front.kjuulh.io/docker-proxy/library/docker:dind + +WORKDIR /src/docker + +COPY --from=builder /src/builder/dist/dagger .