-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
57 lines (44 loc) · 1.27 KB
/
Dockerfile.dev
File metadata and controls
57 lines (44 loc) · 1.27 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Synapsis Development Dockerfile
# =================================
# Optimized for fast builds and development workflow
FROM rust:1.88-bookworm
# Install system dependencies
RUN apt-get update && apt-get install -y \
# Build essentials
build-essential \
pkg-config \
libssl-dev \
# SQLCipher dependencies
libsqlcipher-dev \
# Additional tools
git \
curl \
vim \
watch \
# Cleanup
&& rm -rf /var/lib/apt/lists/*
# Install cargo-watch for hot-reload
RUN cargo install cargo-watch
# Install cargo-audit for security auditing
RUN cargo install cargo-audit
# Install cargo-tarpaulin for code coverage
RUN cargo install cargo-tarpaulin
# Set working directory
WORKDIR /app
# Copy only Cargo files first for better caching
COPY Cargo.toml Cargo.lock ./
# Create dummy source to build dependencies
RUN mkdir src && echo "fn main() {}" > src/main.rs && \
cargo build --release && \
rm -rf src
# Now copy the actual source code
COPY . .
# Build the project
RUN cargo build --release
# Default command (can be overridden)
CMD ["cargo", "watch", "-x", "build --release"]
# Expose ports
EXPOSE 7438 # MCP TCP port
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
CMD cargo check || exit 1