Skip to content

Commit

Permalink
fix: rust version
Browse files Browse the repository at this point in the history
  • Loading branch information
Th0rgal committed May 3, 2024
1 parent 505e8f4 commit d04cbf6
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
# Use the official Rust image as the base image
FROM rust:latest
FROM rust:1.75

# Set the working directory
WORKDIR .
WORKDIR /app

# Copy the Cargo.toml files
COPY Cargo.toml config.toml ./

# Copy the source code
COPY src ./src

# Accept a build argument for the build mode
ARG BUILD_MODE=release

# Build the application based on the build mode
RUN if [ "$BUILD_MODE" = "debug" ]; then \
cargo build; \
else \
cargo build --release; \
fi

# Expose the port your application uses
EXPOSE 8080

# Set the unbuffered environment variable
ENV RUST_BACKTRACE "1"

# Run the binary conditionally based on the build mode
CMD if [ "$BUILD_MODE" = "debug" ]; then ./target/debug/starknetid_server; else ./target/release/starknetid_server; fi

0 comments on commit d04cbf6

Please sign in to comment.