Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.pytest_cache
.ruff_cache
.venv
target
.worktrees
benchmark/datasets
benchmark/tb_runs
Expand Down
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Build the standalone switchyard-server binary against the workspace lockfile.
FROM rust:1.96-bookworm AS builder
WORKDIR /app
COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
COPY crates/ crates/
RUN cargo build --release --locked --package switchyard-server
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

# Runtime image: binary only, runs unprivileged. Mount a TOML deployment at
# /etc/switchyard/config.toml and pass provider API keys as env vars.
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install --yes --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --system --uid 10001 switchyard
COPY --from=builder /app/target/release/switchyard-server /usr/local/bin/switchyard-server
USER switchyard
EXPOSE 4000
ENTRYPOINT ["switchyard-server"]
CMD ["--config", "/etc/switchyard/config.toml"]