Skip to content

Commit debe8dd

Browse files
committed
add docker files
1 parent 4c73163 commit debe8dd

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.git
2+
.github
3+
/target

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM rust:alpine AS builder
2+
3+
RUN apk add python3 musl-dev pkgconfig openssl-dev make
4+
5+
ENV RUSTFLAGS="-C target-feature=-crt-static"
6+
7+
WORKDIR /opt/purginator3000/
8+
9+
COPY . .
10+
11+
RUN cargo build
12+
13+
WORKDIR /opt/purginator3000/synapse_auto_compressor/
14+
15+
RUN cargo build
16+
17+
FROM alpine
18+
19+
RUN apk add --no-cache libgcc
20+
21+
COPY --from=builder /opt/purginator3000/target/debug/synapse_compress_state /usr/local/bin/synapse_compress_state
22+
COPY --from=builder /opt/purginator3000/target/debug/synapse_auto_compressor /usr/local/bin/synapse_auto_compressor

0 commit comments

Comments
 (0)