-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.daemon
44 lines (28 loc) · 1.11 KB
/
Dockerfile.daemon
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
# FROM rustlang/rust:nightly as build
# RUN user=root cargo new --bin daemon
# WORKDIR /app
# COPY ./daemon/Cargo.lock ./Cargo.lock
# COPY ./daemon/Cargo.toml ./Cargo.toml
# # RUN rm ./daemon/src/*.rs
# COPY ./daemon/src ./src
# RUN cargo build --release
# # RUN cargo build
# FROM alpine
# COPY --from=build /app/target/release/server .
# # COPY --from=build /app/target/debug/server .
# CMD ["./daemon"]
FROM rustlang/rust:nightly as builder
WORKDIR /usr/src/daemon
COPY ./daemon .
RUN cargo install --path .
# Old... Failed with "error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory"
# FROM debian:bullseye-slim
# # RUN apt-get update && rm -rf /var/lib/apt/lists/*
# RUN apt-get update
# # RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
# RUN apt-get install -y ca-certificates
# COPY --from=builder /usr/local/cargo/bin/daemon /usr/local/bin/daemon
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y curl libssl3 ca-certificates
COPY --from=builder /usr/local/cargo/bin/daemon /usr/local/bin/daemon
CMD ["daemon"]