diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -1,6 +1,14 @@ FROM rust:1-alpine AS builder -RUN cargo install --locked aichat \ - && cargo install --locked argc + +# Set the working directory +WORKDIR /usr/src/app + +# Copy the local project files (since Dockerfile and project are in the same directory) +COPY . . + +# Build and install the local Rust program +RUN cargo install --path . --locked +RUN cargo install --locked argc FROM alpine:3.21 @@ -21,6 +29,7 @@ RUN apk add --no-cache \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y +# Copy your newly built binary (replace with your actual crate name) COPY --from=builder /usr/local/cargo/bin/aichat /usr/local/bin/aichat COPY --from=builder /usr/local/cargo/bin/argc /usr/local/bin/argc |
