Skip to content

Commit

Permalink
Release a light image tag
Browse files Browse the repository at this point in the history
Omit all plugins except the shell plugin that will be included in the main binary.
  • Loading branch information
Victor Castell committed Jun 8, 2021
1 parent 07afbf9 commit 0a605bf
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ jobs:

- name: set up buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
uses: docker/setup-buildx-action@v1

- name: login to dockerhub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
Expand All @@ -60,3 +58,15 @@ jobs:
-t ${DOCKER_REPO:-dkron/dkron}:latest \
-f Dockerfile.hub \
.
- name: build (and publish) light image
env:
# fork friendly ^^
DOCKER_REPO: ${{ secrets.DOCKER_REPO }}
run: |
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--build-arg VERSION=${{ steps.prepare.outputs.tag_name }} \
--push \
-t ${DOCKER_REPO:-dkron/dkron}:${{ steps.prepare.outputs.tag_name }}-light \
-f Dockerfile.light.hub \
.
21 changes: 21 additions & 0 deletions Dockerfile.light.hub
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1.2
FROM alpine:3.12
LABEL maintainer="Victor Castell <victor@victorcastell.com>"
ARG TARGETPLATFORM

RUN set -x \
&& buildDeps='bash ca-certificates openssl tzdata' \
&& apk add --update $buildDeps \
&& rm -rf /var/cache/apk/* \
&& mkdir -p /opt/local/dkron

EXPOSE 8080 8946

ENV SHELL /bin/bash
WORKDIR /opt/local/dkron

RUN --mount=target=/build cp /build/dist/dkron_$(echo ${TARGETPLATFORM} | tr '/' '_')/dkron .

ENTRYPOINT ["/opt/local/dkron/dkron"]

CMD ["--help"]
Loading

0 comments on commit 0a605bf

Please sign in to comment.