diff --git a/.drone.yml b/.drone.yml index 43ee655..591d936 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,20 +3,21 @@ name: default type: docker steps: - # - name: server - # image: plugins/docker - # environment: - # DOCKER_BUILDKIT: 1 - # settings: - # username: kasperhermansen - # password: - # from_secret: - # docker_secret - # repo: kasperhermansen/cuddle - # tags: latest - # context: . - # dockerfile: templates/build_cuddle_image.Dockerfile - # cache_from: kasperhermansen/cuddle:latest + - name: server + image: plugins/docker + environment: + DOCKER_BUILDKIT: 1 + settings: + username: kasperhermansen + password: + from_secret: + docker_secret + repo: kasperhermansen/cuddle + tags: latest + context: . + dockerfile: templates/build_cuddle_image.Dockerfile + cache_from: kasperhermansen/cuddle:latest + - name: load_secret image: debian:buster-slim volumes: @@ -43,7 +44,6 @@ steps: DOCKER_PASSWORD: from_secret: docker_password commands: - - set -e - cuddle_cli x build_cuddle_image depends_on: - "load_secret" diff --git a/templates/build_cuddle_image.Dockerfile b/templates/build_cuddle_image.Dockerfile index 92e5231..4071680 100644 --- a/templates/build_cuddle_image.Dockerfile +++ b/templates/build_cuddle_image.Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.62.1-slim-bullseye +FROM rust:1.62.1-slim-bullseye as base RUN apt-get update && apt-get upgrade -y @@ -7,4 +7,8 @@ RUN apt-get install -y -q build-essential curl git pkg-config WORKDIR /app/cuddle/ -RUN cargo install --git https://git.front.kjuulh.io/kjuulh/cuddle.git cuddle_cli +RUN cargo install --git https://git.front.kjuulh.io/kjuulh/cuddle.git cuddle_cli + +FROM docker:stable-dind + +COPY --from=base /usr/bin/cuddle_cli /usr/bin/cuddle_cli