-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (16 loc) · 847 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
FROM library/rust:latest as builder
WORKDIR /opt
ARG veilid_version=main
RUN git clone --branch ${veilid_version} --depth 1 --recurse-submodules https://gitlab.com/veilid/veilid.git
WORKDIR /opt/veilid
RUN apt update -y && apt install -y checkinstall cmake build-essential && ./scripts/earthly/install_capnproto.sh 1 && ./scripts/earthly/install_protoc.sh
RUN cd veilid-server && cargo build --release
RUN cd veilid-cli && cargo build --release
FROM library/ubuntu:22.04
COPY --from=builder /opt/veilid/target/release/veilid-server /usr/local/bin/veilid-server
COPY --from=builder /opt/veilid/target/release/veilid-cli /usr/local/bin/veilid-cli
RUN apt update -y && apt install -y tini && rm -rf /var/lib/apt/lists/*
EXPOSE 5150/tcp
EXPOSE 5150/udp
EXPOSE 5959/tcp
CMD ["/usr/bin/tini","--","/usr/local/bin/veilid-server","--foreground"]