Skip to content

Instantly share code, notes, and snippets.

@benglewis
Created May 20, 2024 13:08
Show Gist options
  • Save benglewis/5f5f1541ef0db6277850a225ea9ad74d to your computer and use it in GitHub Desktop.
Save benglewis/5f5f1541ef0db6277850a225ea9ad74d to your computer and use it in GitHub Desktop.
An Alpine based Dockerfile for Pixi
ARG PIXI_VERSION=0.22.0
ARG BASE_IMAGE=frolvlad/alpine-glibc:alpine-3.19
ARG PIXI_USER=pixi
FROM --platform=linux/amd64 $BASE_IMAGE AS builder
ARG PIXI_VERSION
RUN apk update && apk add --no-cache curl
RUN curl -Ls \
"https://github.com/prefix-dev/pixi/releases/download/v${PIXI_VERSION}/pixi-$(uname -m)-unknown-linux-musl" \
-o /pixi && chmod +x /pixi
RUN /pixi --version
FROM --platform=linux/amd64 $BASE_IMAGE
ARG PIXI_USER
USER $PIXI_USER
COPY --from=builder --chown=$PIXI_USER:$PIXI_USER /pixi /usr/local/bin/pixi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment