Add docker build flow

This commit is contained in:
2022-10-23 17:39:52 -06:00
parent dbb7134626
commit a8e2d70b6b
4 changed files with 52 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
*.toml
*.yml
+2 -1
View File
@@ -1,2 +1,3 @@
runner.toml *.toml
*.yml
run run
+14
View File
@@ -0,0 +1,14 @@
FROM golang:1.19-bullseye as builder
MAINTAINER restitux <restitux@ohea.xyz>
COPY . /runner
WORKDIR /runner
RUN go build .
FROM debian:bullseye
COPY --from=builder /runner/runner /runner
RUN apt-get update && apt-get install -y\
git \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/runner"]
+34
View File
@@ -0,0 +1,34 @@
version: "3"
volumes:
docker-certs:
networks:
cursorius:
services:
cursorius-runner:
build:
context: .
dockerfile: ./Dockerfile
environment:
- "DOCKER_HOST=tcp://dind:2376"
- "DOCKER_CERT_PATH=/certs/client"
networks:
- cursorius
volumes:
- "./runner-docker.toml:/root/.config/cursorius/runner.toml"
- "./job:/job"
- docker-certs:/certs/client:ro
dind:
image: docker:dind
privileged: true
networks:
- cursorius
environment:
- "DOCKER_TLS_CERTDIR=/certs"
volumes:
- "./job:/job"
- docker-certs:/certs/client