Commit 62a3cb29 authored by clonejo's avatar clonejo
Browse files

Containerfile for running

parent 577c2943
FROM docker.io/debian:bullseye-slim
RUN apt-get update && \
apt-get install -y curl build-essential pkg-config libssl-dev libsqlite3-dev libsodium-dev && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
ENV PATH=$PATH:/root/.cargo/bin
WORKDIR /tmp
ADD Cargo.toml Cargo.lock /tmp/
ADD src /tmp/src
ADD migrations /tmp/migrations
RUN cargo build --release
FROM docker.io/debian:bullseye-slim
RUN apt-get update && \
apt-get install -y curl sqlite3 nmap iproute2
COPY --from=0 /tmp/target/release/maccollect /usr/local/bin/maccollect
ENV CONFIG="/etc/maccollect/config.yaml"
WorkDir /etc/maccollect
CMD ["/usr/local/bin/maccollect"]
# Debian packets
gcc
libssl-dev
nmap
curl
sqlite3
# Run with Podman/Docker
```
podman build -f Containerfile -t maccollect
cargo run maccollect \
--volume=config.yaml:/etc/maccollect/config.yaml:ro \
--volume=mapping.sqlite:/var/lib/maccollect/mapping.sqlite:rw \
--network=host \
--cap-add=CAP_NET_RAWIO
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment