Skip to content

Commit

Permalink
Add simple Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
alisinabh committed May 1, 2024
1 parent 50d2df2 commit 5094b02
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/target
*.mmdb
db

# Keep everything in tests-data
!tests-data/**
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
name = "atlas_rs"

[[bin]]
name = "altas"
name = "atlas"
path = "src/main.rs"

[dependencies]
Expand Down
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM rust:1-bookworm AS builder

WORKDIR /app

COPY ./src ./src
COPY Cargo.* ./

RUN cargo build --release

FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*

COPY --from=builder /app/target/release/atlas /usr/local/bin/

USER nobody

CMD ["atlas"]

0 comments on commit 5094b02

Please sign in to comment.