Skip to content

Modern Docker Management, Designed for Everyone

chore: drop -distroless dockerfiles

Kyle Mendell8c6d448b63d9
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 01c9e011e..23754df6a 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -338,70 +338,12 @@ dockers_v2:
disable: '{{ if not (index .Env "BUILD_NEXT") }}true{{ end }}'
sbom: true
- - id: arcane-next-distroless
- ids:
- - arcane
- dockerfile: docker/next-builds/Dockerfile-next-distroless
- images:
- - "ghcr.io/getarcaneapp/arcane"
- - "ghcr.io/getarcaneapp/manager"
- tags:
- - "next-distroless"
- - "{{ .Version }}-distroless"
- platforms:
- - linux/amd64
- - linux/arm64
- - linux/arm/v7
- labels:
- "org.opencontainers.image.authors": "OFKM Technologies"
- "org.opencontainers.image.url": "https://github.com/getarcaneapp/arcane"
- "org.opencontainers.image.documentation": "https://github.com/getarcaneapp/arcane/blob/main/README.md"
- "org.opencontainers.image.source": "https://github.com/getarcaneapp/arcane"
- "org.opencontainers.image.version": "{{.Version}}"
- "org.opencontainers.image.revision": "{{.FullCommit}}"
- "org.opencontainers.image.licenses": "BSD-3-Clause"
- "org.opencontainers.image.title": "Arcane"
- "org.opencontainers.image.description": "Modern Docker Management, Made for Everyone"
- "com.getarcaneapp.arcane": "true"
- disable: '{{ if not (index .Env "BUILD_NEXT") }}true{{ end }}'
- sbom: true
-
- - id: arcane-agent-next-distroless
- ids:
- - arcane-agent
- dockerfile: docker/next-builds/Dockerfile-agent-distroless
- images:
- - "ghcr.io/getarcaneapp/arcane-headless"
- - "ghcr.io/getarcaneapp/agent"
- tags:
- - "next-distroless"
- - "{{ .Version }}-distroless"
- platforms:
- - linux/amd64
- - linux/arm64
- - linux/arm/v7
- labels:
- "org.opencontainers.image.authors": "OFKM Technologies"
- "org.opencontainers.image.url": "https://github.com/getarcaneapp/arcane"
- "org.opencontainers.image.documentation": "https://github.com/getarcaneapp/arcane/blob/main/README.md"
- "org.opencontainers.image.source": "https://github.com/getarcaneapp/arcane"
- "org.opencontainers.image.version": "{{.Version}}"
- "org.opencontainers.image.revision": "{{.FullCommit}}"
- "org.opencontainers.image.licenses": "BSD-3-Clause"
- "org.opencontainers.image.title": "Arcane Agent"
- "org.opencontainers.image.description": "Arcane Agent"
- "com.getarcaneapp.arcane.agent": "true"
- disable: '{{ if not (index .Env "BUILD_NEXT") }}true{{ end }}'
- sbom: true
-
docker_signs:
- id: cosign-next-images
cmd: cosign
ids:
- arcane-next
- arcane-agent-next
- - arcane-next-distroless
- - arcane-agent-next-distroless
stdin: "{{ .Env.COSIGN_PASSWORD }}"
args:
- sign
diff --git a/docker/next-builds/Dockerfile-agent-distroless b/docker/next-builds/Dockerfile-agent-distroless
deleted file mode 100644
index cfa5bfff2..000000000
--- a/docker/next-builds/Dockerfile-agent-distroless
+++ /dev/null
@@ -1,18 +0,0 @@
-FROM gcr.io/distroless/static-debian13
-
-ARG TARGETARCH
-ARG TARGETVARIANT
-
-WORKDIR /app
-
-COPY linux/${TARGETARCH}/${TARGETVARIANT}/arcane-agent ./arcane-agent
-
-ENV ENVIRONMENT=production \
- AGENT_MODE=true \
- GIN_MODE=release \
- PORT=3553
-
-EXPOSE 3553
-VOLUME ["/app/data"]
-
-CMD ["./arcane-agent"]
\ No newline at end of file
diff --git a/docker/next-builds/Dockerfile-agent-static b/docker/next-builds/Dockerfile-agent-static
index dd5d99003..577a0dcd3 100644
--- a/docker/next-builds/Dockerfile-agent-static
+++ b/docker/next-builds/Dockerfile-agent-static
@@ -1,11 +1,10 @@
-FROM alpine:3
+ARG ARCANE_RUNTIME_BASE_IMAGE=ghcr.io/getarcaneapp/base:distroless
+FROM ${ARCANE_RUNTIME_BASE_IMAGE}
ARG TARGETARCH
ARG TARGETVARIANT
WORKDIR /app
-RUN apk add --no-cache ca-certificates tzdata curl
-RUN mkdir -p /app/data
COPY linux/${TARGETARCH}/${TARGETVARIANT}/arcane-agent ./arcane-agent
@@ -14,7 +13,9 @@ ENV ENVIRONMENT=production \
GIN_MODE=release \
PORT=3553
+# The container starts as "root", but arcane drops to the requetsed PUID and PGID after the runtime is initialized
+USER 0:0
EXPOSE 3553
VOLUME ["/app/data"]
-CMD ["./arcane-agent"]
\ No newline at end of file
+CMD ["./arcane-agent"]
diff --git a/docker/next-builds/Dockerfile-next-distroless b/docker/next-builds/Dockerfile-next-distroless
deleted file mode 100644
index 6a8264ac0..000000000
--- a/docker/next-builds/Dockerfile-next-distroless
+++ /dev/null
@@ -1,17 +0,0 @@
-FROM gcr.io/distroless/static-debian13
-
-ARG TARGETARCH
-ARG TARGETVARIANT
-
-WORKDIR /app
-
-COPY linux/${TARGETARCH}/${TARGETVARIANT}/arcane ./arcane
-
-ENV ENVIRONMENT=production
-ENV GIN_MODE=release
-ENV PORT=3552
-
-EXPOSE 3552
-VOLUME ["/app/data"]
-
-CMD ["./arcane"]
\ No newline at end of file
diff --git a/docker/next-builds/Dockerfile-static b/docker/next-builds/Dockerfile-static
index a99410ed2..6cc1c24c7 100644
--- a/docker/next-builds/Dockerfile-static
+++ b/docker/next-builds/Dockerfile-static
@@ -1,11 +1,10 @@
-FROM alpine:3
+ARG ARCANE_RUNTIME_BASE_IMAGE=ghcr.io/getarcaneapp/base:distroless
+FROM ${ARCANE_RUNTIME_BASE_IMAGE}
ARG TARGETARCH
ARG TARGETVARIANT
WORKDIR /app
-RUN apk add --no-cache ca-certificates tzdata curl
-RUN mkdir -p /app/data
COPY linux/${TARGETARCH}/${TARGETVARIANT}/arcane ./arcane
@@ -13,7 +12,9 @@ ENV ENVIRONMENT=production
ENV GIN_MODE=release
ENV PORT=3552
+# The container starts as "root", but arcane drops to the requetsed PUID and PGID after the runtime is initialized
+USER 0:0
EXPOSE 3552
VOLUME ["/app/data"]
-CMD ["./arcane"]
\ No newline at end of file
+CMD ["./arcane"]