11# Usage:
2- # # Build
3- # docker build --build-arg VERSION=0.14.0 -t ghcr.io/natlabrockies/torc:0.14.0 .
2+ # # Download and extract release binaries
3+ # VERSION=0.14.0
4+ # mkdir -p artifact
5+ # curl -fsSL "https://github.com/NatLabRockies/torc/releases/download/v${VERSION}/torc-x86_64-unknown-linux-musl.tar.gz" \
6+ # | tar xz -C artifact/
47#
5- # # Push to GitHub Container Registry
6- # echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
7- # docker push ghcr.io/natlabrockies/torc:0.14.0
8+ # # Build
9+ # docker build --build-arg VERSION=$VERSION -t ghcr.io/natlabrockies/torc:$VERSION .
810#
911# # Run with required env vars
1012# docker run -d -p 8080:8080 \
1113# -e TORC_AUTH_FILE=/data/htpasswd \
1214# -e TORC_ADMIN_USERS=admin \
1315# -v ./htpasswd:/data/htpasswd:ro \
1416# -v torc-data:/data \
15- # ghcr.io/natlabrockies/torc:0.14.0
17+ # ghcr.io/natlabrockies/torc:$VERSION
1618#
1719# # Run torc CLI
18- # docker run --rm ghcr.io/natlabrockies/torc:0.14.0 torc --version
20+ # docker run --rm ghcr.io/natlabrockies/torc:$VERSION torc --version
1921
2022FROM alpine:3.23
2123
@@ -29,12 +31,13 @@ LABEL org.opencontainers.image.title="torc" \
2931 org.opencontainers.image.version="${VERSION}" \
3032 org.opencontainers.image.licenses="BSD-3-Clause"
3133
32- # Download release binaries and remove curl afterward to keep image small
33- # This is going to use pixi as soon as images are stored on conda-forge.
34- RUN apk add --no-cache ca-certificates curl sqlite tmux && \
35- curl -fsSL "https://github.com/NatLabRockies/torc/releases/download/v${VERSION}/torc-x86_64-unknown-linux-musl.tar.gz" \
36- | tar xz -C /usr/local/bin/ && \
37- apk del curl
34+ # Install runtime dependencies
35+ RUN apk add --no-cache ca-certificates sqlite tmux
36+
37+ # Copy pre-extracted release binaries from the build context
38+ COPY artifact/torc artifact/torc-server artifact/torc-slurm-job-runner \
39+ artifact/torc-dash artifact/torc-htpasswd artifact/torc-mcp-server \
40+ /usr/local/bin/
3841
3942# Create data directory with OpenShift-compatible permissions.
4043# OpenShift runs containers as arbitrary non-root UIDs but always in group 0 (root).
0 commit comments