-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (29 loc) · 1.47 KB
/
Dockerfile
File metadata and controls
37 lines (29 loc) · 1.47 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
FROM rust:1.93-slim-trixie@sha256:c0a38f5662afdb298898da1d70b909af4bda4e0acff2dc52aea6360a9b9c6956 AS builder
LABEL MAINTAINER="Richard Zak <richard@malwaredb.net>"
LABEL org.opencontainers.image.authors=richard@malwaredb.net
LABEL SOURCE="https://github.com/malwaredb/malwaredb-rs"
LABEL org.opencontainers.image.source=https://github.com/malwaredb/malwaredb-rs
# Install the libmagic dev package so we can link against it, and git so the binary gets the git info for the version
RUN apt-get update && apt-get install -y libmagic-dev git
WORKDIR /malwaredb
COPY . .
COPY .git/ .
# Add `--features=admin,sqlite,vt,yara` for admin, sqlite support, VirusTotal, Yara feature(s).
# Any, some, or no features are required.
# Without the admin feature, another binary with admin is needed for initial configuration.
RUN cargo install cargo-auditable && cargo auditable build --release --features=vt,yara && cp target/release/mdb_server . && cargo clean
FROM debian:trixie-slim@sha256:1d3c811171a08a5adaa4a163fbafd96b61b87aa871bbc7aa15431ac275d3d430
RUN apt-get update && apt-get install -y libmagic1
WORKDIR /malwaredb
COPY --from=builder /malwaredb/mdb_server /malwaredb
# If running Malware DB from a config file.
# If using TLS, this is where the certificate and private key would reside.
RUN mkdir /malwaredb/config
VOLUME /malwaredb/config
# Storage for saved samples.
RUN mkdir /malwaredb/samples
VOLUME /malwaredb/samples
# Start MalwareDB
CMD ["./mdb_server"]
STOPSIGNAL SIGINT
EXPOSE 8080/tcp