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

Rustfinity Runner V2 #43

Merged
merged 26 commits into from
Nov 16, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
dockerfile updated
dcodesdev committed Nov 16, 2024
commit e8b33f72c8ddfc00cf85d67fd20dd8e75f0b47f6
25 changes: 13 additions & 12 deletions crates/rustfinity-runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
FROM rust:slim-buster
# --- Stage 1 ---
FROM rust:slim-buster AS builder
WORKDIR /app

COPY crates/rustfinity-runner .
RUN cargo build --release

# --- Stage 2 ---

FROM rust:slim-buster AS runner
LABEL rustfinity-runner="true"

# Install OpenSSL development packages and pkg-config
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
heaptrack \
&& rm -rf /var/lib/apt/lists/*

# Build the Runner CLI
WORKDIR /app

COPY crates/ crates/
COPY crates/syntest crates/syntest
COPY crates/rustfinity-runner/docker/Cargo.toml Cargo.toml

RUN cargo new challenges/playground && rm -rf challenges/playground/.git

WORKDIR /app/crates/rustfinity-runner
RUN cargo build --release

# Move the Runner CLI executable
RUN mv /app/target/release/rustfinity-runner /app/

WORKDIR /app
RUN cargo build

COPY --from=builder /app/target/release/rustfinity-runner /app/

# The final structure:
# /app/rustfinity-runner (executable)
# /app/challenges/playground (project)