diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..edb7bf0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +/target +*.mmdb +db + +# Keep everything in tests-data +!tests-data/** diff --git a/Cargo.toml b/Cargo.toml index fb370e2..3704467 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" name = "atlas_rs" [[bin]] -name = "altas" +name = "atlas" path = "src/main.rs" [dependencies] diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d016a64 --- /dev/null +++ b/Dockerfile @@ -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"]