From 64e6ad75ab63e49aa478d2f4c537e8efd89597ae Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Thu, 27 Feb 2025 21:55:44 -0500 Subject: [PATCH 1/2] rename the builder and runtime images --- .../{publish-builder-base.yml => publish-builder.yml} | 6 +++--- .../{publish-runtime-base.yml => publish-runtime.yml} | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename .github/workflows/{publish-builder-base.yml => publish-builder.yml} (91%) rename .github/workflows/{publish-runtime-base.yml => publish-runtime.yml} (91%) diff --git a/.github/workflows/publish-builder-base.yml b/.github/workflows/publish-builder.yml similarity index 91% rename from .github/workflows/publish-builder-base.yml rename to .github/workflows/publish-builder.yml index 7be957e..fe9cb4e 100644 --- a/.github/workflows/publish-builder-base.yml +++ b/.github/workflows/publish-builder.yml @@ -1,16 +1,16 @@ -name: Publish Builder Base Image +name: Publish Builder Image on: push: branches: [main] paths: - "images/debian/build/Dockerfile" - - ".github/workflows/publish-builder-base.yml" + - ".github/workflows/publish-builder.yml" workflow_dispatch: env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }}-builder-base + IMAGE_NAME: ${{ github.repository }}-builder jobs: build: diff --git a/.github/workflows/publish-runtime-base.yml b/.github/workflows/publish-runtime.yml similarity index 91% rename from .github/workflows/publish-runtime-base.yml rename to .github/workflows/publish-runtime.yml index a58258d..f9e8207 100644 --- a/.github/workflows/publish-runtime-base.yml +++ b/.github/workflows/publish-runtime.yml @@ -1,16 +1,16 @@ -name: Publish Runtime Base Image +name: Publish Runtime Image on: push: branches: [main] paths: - "images/debian/runtime/Dockerfile" - - ".github/workflows/publish-runtime-base.yml" + - ".github/workflows/publish-runtime.yml" workflow_dispatch: env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }}-runtime-base + IMAGE_NAME: ${{ github.repository }}-runtime jobs: build: From 0b034943e392ffbc9a0f3693478ccfbbcbdef7d7 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Thu, 27 Feb 2025 21:57:49 -0500 Subject: [PATCH 2/2] pull mise from mise image --- images/debian/build/Dockerfile | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/images/debian/build/Dockerfile b/images/debian/build/Dockerfile index 1d25eec..ef4129f 100644 --- a/images/debian/build/Dockerfile +++ b/images/debian/build/Dockerfile @@ -1,18 +1,3 @@ -FROM rust:1-slim-bookworm AS builder - -# Compile mise from source with size optimizations -RUN apt-get update && apt-get install -y \ - git \ - pkg-config \ - libssl-dev \ - && rm -rf /var/lib/apt/lists/* - -RUN git clone https://github.com/jdx/mise.git /tmp/mise && \ - cd /tmp/mise && \ - RUSTFLAGS="-C opt-level=z -C link-arg=-s -C codegen-units=1" \ - cargo build --profile serious \ - --config debuginfo=0 - FROM buildpack-deps:bookworm-scm # Install any system deps that might be needed to build a language from source @@ -41,5 +26,6 @@ ENV MISE_INSTALL_PATH=/usr/local/bin/mise \ PATH=/mise/shims:$PATH # Copy mise binary from builder -COPY --from=builder /tmp/mise/target/serious/mise /usr/local/bin/ +ARG MISE_IMAGE=ghcr.io/railwayapp/railpack-mise:latest +COPY --from=${MISE_IMAGE} /usr/local/bin/mise /usr/local/bin/ RUN chmod +x /usr/local/bin/mise