diff options
author | Alex Auvolat <alex@adnab.me> | 2021-12-08 12:02:39 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-12-08 12:02:39 +0100 |
commit | 7599dfc0ef5b06d92eca8f9a954663e008a0b1fb (patch) | |
tree | 8d3c6402487e5397663cab2d35f77ed227c48390 /Dockerfile | |
parent | d7f3c13fa409ef2ee1ee78c18aae47e57383bec0 (diff) | |
download | tricot-7599dfc0ef5b06d92eca8f9a954663e008a0b1fb.tar.gz tricot-7599dfc0ef5b06d92eca8f9a954663e008a0b1fb.zip |
Use self-signed certificates if necessary
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ebda1fc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM rust:1.57-bullseye as builder + +RUN apt-get update && \ + apt-get install -y libssl-dev pkg-config + +WORKDIR /srv + +# Build dependencies and cache them +COPY Cargo.* ./ +RUN mkdir -p src && \ + echo "fn main() {println!(\"if you see this, the build broke\")}" > src/main.rs && \ + cargo build --release && \ + rm -r src && \ + rm target/release/deps/tricot* + +# Build final app +COPY ./src ./src +RUN cargo build --release + +FROM debian:bullseye-slim +RUN apt-get update && apt-get install -y libssl1.1 iptables +COPY --from=builder /srv/target/release/tricot /usr/local/sbin/tricot +CMD ["/usr/local/sbin/tricot"] |