trying with dind
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Kasper Juul Hermansen 2022-10-28 23:51:49 +02:00
parent 8037af77e9
commit 3066e29a96
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
2 changed files with 39 additions and 3 deletions

View File

@ -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: {}

13
Dockerfile Normal file
View File

@ -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 .