-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile.dev
More file actions
42 lines (32 loc) · 903 Bytes
/
Dockerfile.dev
File metadata and controls
42 lines (32 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Development Dockerfile for RedisGate
# This Dockerfile is optimized for development with faster builds and debugging capabilities
FROM rust:1.75-slim
# Install development dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
curl \
git \
vim \
&& rm -rf /var/lib/apt/lists/*
# Install cargo tools for development
RUN cargo install cargo-watch cargo-edit
# Set working directory
WORKDIR /app
# Copy dependency files
COPY Cargo.toml Cargo.lock* ./
# Install dependencies
RUN mkdir src && echo "fn main() {}" > src/main.rs && \
cargo build && \
rm -rf src
# Copy source code
COPY . .
# Expose the application port
EXPOSE 8080
# Set development environment variables
ENV RUST_LOG=debug
ENV RUST_BACKTRACE=1
ENV APP_HOST=0.0.0.0
ENV APP_PORT=8080
# Default command for development (with auto-reload)
CMD ["cargo", "watch", "-x", "run"]