forked from developerfred/titanium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (36 loc) · 988 Bytes
/
Dockerfile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM rustlang/rust:nightly as builder
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
libgtk-3-dev \
libwebkit2gtk-4.0-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
cmake \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
COPY Cargo.toml Cargo.lock* ./
RUN mkdir src && \
echo "fn main() {}" > src/main.rs && \
cargo build --release && \
cargo build --tests && \
rm -rf src
COPY src src/
RUN cargo build --release && \
cargo test --no-run
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
ca-certificates \
libwebkit2gtk-4.0-37 \
libjavascriptcoregtk-4.0-18 \
libsoup2.4-1 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-x \
libgtk-3-0 \
curl \
librsvg2-2 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/src/app/target/release/url-to-png-service /usr/local/bin/
EXPOSE 3000
CMD ["titanium"]