Skip to content

Modern Docker Management, Designed for Everyone

chore: move static builds back to alpine

Kyle Mendell57de01677f38
diff --git a/.github/workflows/build-next-images.yml b/.github/workflows/build-next-images.yml
index 73e6e3ead..2f1b46500 100644
--- a/.github/workflows/build-next-images.yml
+++ b/.github/workflows/build-next-images.yml
@@ -16,14 +16,51 @@ permissions:
id-token: write
jobs:
+ build-binaries:
+ name: Build Binaries
+ runs-on: depot-ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v6
+
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version-file: backend/go.mod
+ cache-dependency-path: backend/go.sum
+
+ - name: Build manager binaries
+ run: |
+ chmod +x ./scripts/github/build-binaries.sh
+ VERSION=next REVISION=${{ github.sha }} ./scripts/github/build-binaries.sh --docker
+
+ - name: Build agent binaries
+ run: |
+ VERSION=next REVISION=${{ github.sha }} ./scripts/github/build-binaries.sh --docker --agent
+
+ - name: Upload binaries
+ uses: actions/upload-artifact@v4
+ with:
+ name: binaries
+ path: backend/.bin/
+ retention-days: 1
+
build-manager-image:
name: Build Manager Image
runs-on: depot-ubuntu-latest
- timeout-minutes: 45
+ needs: build-binaries
+ timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v6
+ - name: Download binaries
+ uses: actions/download-artifact@v4
+ with:
+ name: binaries
+ path: backend/.bin/
+
- name: Set up Depot CLI
uses: depot/setup-action@v1
@@ -47,7 +84,7 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.image-name.outputs.value }}:next
- file: docker/Dockerfile
+ file: docker/Dockerfile-static
build-args: |
VERSION=next
REVISION=${{ github.sha }}
@@ -55,12 +92,18 @@ jobs:
build-agent-image:
name: Build Agent Image
runs-on: depot-ubuntu-latest
- needs: build-manager-image
- timeout-minutes: 45
+ needs: build-binaries
+ timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v6
+ - name: Download binaries
+ uses: actions/download-artifact@v4
+ with:
+ name: binaries
+ path: backend/.bin/
+
- name: Set up Depot CLI
uses: depot/setup-action@v1
@@ -84,7 +127,7 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.image-name.outputs.value }}:next
- file: docker/Dockerfile-agent
+ file: docker/Dockerfile-agent-static
build-args: |
VERSION=next
REVISION=${{ github.sha }}
diff --git a/docker/Dockerfile-agent-static b/docker/Dockerfile-agent-static
index f483da835..d13b71b72 100644
--- a/docker/Dockerfile-agent-static
+++ b/docker/Dockerfile-agent-static
@@ -1,11 +1,11 @@
-FROM debian:trixie-slim
+FROM alpine:3
ARG TARGETARCH
ARG VERSION="dev"
ARG REVISION="unknown"
WORKDIR /app
-RUN apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y ca-certificates tzdata curl && rm -rf /var/lib/apt/lists/*
+RUN apk add --no-cache ca-certificates tzdata curl
RUN mkdir -p /app/data
COPY ./backend/.bin/arcane-agent-linux-${TARGETARCH} ./arcane-agent
diff --git a/docker/Dockerfile-static b/docker/Dockerfile-static
index af0c91e55..12b383d76 100644
--- a/docker/Dockerfile-static
+++ b/docker/Dockerfile-static
@@ -1,11 +1,11 @@
-FROM debian:trixie-slim
+FROM alpine:3
ARG TARGETARCH
ARG VERSION="dev"
ARG REVISION="unknown"
WORKDIR /app
-RUN apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y ca-certificates tzdata curl && rm -rf /var/lib/apt/lists/*
+RUN apk add --no-cache ca-certificates tzdata curl
RUN mkdir -p /app/data
COPY ./backend/.bin/arcane-linux-${TARGETARCH} ./arcane