summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 6c55613..8569321 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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