-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (44 loc) · 1.33 KB
/
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
57
58
59
FROM ubuntu:22.04 AS builder
LABEL version="0.1.1"
LABEL name="Cosmian Findex server docker container"
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /root
RUN apt-get update \
&& apt-get install --no-install-recommends -qq -y \
curl \
build-essential \
libssl-dev \
ca-certificates \
libclang-dev \
libsodium-dev \
pkg-config \
git \
wget \
&& apt-get -y -q upgrade \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain "nightly-x86_64-unknown-linux-gnu"
COPY . /root/findex-server
WORKDIR /root/findex-server
RUN /root/.cargo/bin/cargo build --release --no-default-features
#
# Findex server
#
FROM ubuntu:22.04 AS findex-server
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install --no-install-recommends -qq -y \
ca-certificates \
libssl-dev \
libsodium-dev \
&& apt-get -y -q upgrade \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /root/findex-server/target/release/cosmian_findex_server /usr/bin/cosmian_findex_server
COPY --from=builder /root/findex-server/target/release/cosmian_findex_cli /usr/bin/cosmian_findex_cli
#
# Create working directory
#
WORKDIR /data
EXPOSE 9998
ENTRYPOINT ["cosmian_findex_server"]