-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
43 lines (33 loc) · 998 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
# Stage 1: Build the binary
FROM rust:latest as builder
WORKDIR /app
# copy over your manifests
COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml
COPY ./manga-tui-config.toml ./manga-tui-config.toml
COPY ./src ./src
# Install required native libraries
RUN apt-get update && apt-get install -y \
libdbus-1-dev pkg-config \
openssl \
libssl-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
RUN cargo build --release
# Stage 2: Create a minimal runtime image
FROM debian:latest
WORKDIR /app
COPY --from=builder /app/target/release/manga-tui .
COPY ./manga-tui-config.toml ./manga-tui-config.toml
COPY ./src ./src
# Install required native libraries
RUN apt-get update && apt-get install -y \
libdbus-1-dev pkg-config \
openssl \
libssl-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Set the terminal environment
ENV TERM=xterm-256color
# Command to run the application
CMD ["./manga-tui"]