Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename builder and runtime images #41

Merged
merged 2 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
18 changes: 2 additions & 16 deletions images/debian/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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