Skip to content

Commit ce114e8

Browse files
committed
chore: add Docker image
1 parent d245abc commit ce114e8

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

.dockerignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
cat > .dockerignore <<'EOF'
2+
# Ignore everything at repo root
3+
*
4+
5+
# Keep docker config
6+
!Dockerfile
7+
!.dockerignore
8+
9+
# Keep Rust build inputs
10+
!Cargo.toml
11+
!Cargo.lock
12+
!src/
13+
!src/**
14+
!build.rs
15+
!.cargo/
16+
!.cargo/**
17+
EOF

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# -------- builder --------
2+
FROM rust:1-bookworm AS builder
3+
4+
WORKDIR /app
5+
6+
COPY Cargo.toml Cargo.lock ./
7+
COPY src ./src
8+
9+
RUN cargo build --release --locked
10+
11+
# -------- runtime --------
12+
FROM debian:bookworm-slim AS runtime
13+
14+
RUN apt-get update \
15+
&& apt-get install -y --no-install-recommends hmmer ca-certificates \
16+
&& rm -rf /var/lib/apt/lists/*
17+
18+
COPY --from=builder /app/target/release/itsxrust /usr/local/bin/itsxrust
19+
20+
ENTRYPOINT ["itsxrust"]
21+
CMD ["--help"]

0 commit comments

Comments
 (0)