-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.server
27 lines (19 loc) · 991 Bytes
/
Dockerfile.server
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
FROM ubuntu:noble AS builder
ARG PIP_INDEX_URL
ARG PIP_TRUSTED_HOST
ENV PIP_INDEX_URL=${PIP_INDEX_URL}
ENV PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST}
COPY . /faucetconfrpc
WORKDIR /faucetconfrpc
RUN apt-get update && apt-get install -y curl python3-dev gcc git g++ libc6-dev libyaml-dev libffi-dev libxml2-dev libxslt-dev make python3-pip libssl-dev openssl pkg-config
RUN --mount=type=tmpfs,target=/root/.cargo /bin/bash -c 'curl https://sh.rustup.rs -sSf | bash -s -- -y && source ~/.cargo/env && MAKEFLAGS="-j $(nproc)" pip install . --break-system-packages -v'
FROM ubuntu:noble
RUN apt-get update && apt-get install -y python3 iproute2 libatomic1 libssl1* openssl
COPY --from=builder /usr/local /usr/local
RUN python3 -c "from faucetconfrpc.faucetconfrpc_client_lib import FaucetConfRpcClient"
RUN faucetconfrpc_client --help
RUN faucetconfrpc_server --help
RUN ss --help
EXPOSE 59999
ENTRYPOINT ["faucetconfrpc_server"]
HEALTHCHECK --interval=30s CMD ss -tln|grep -q 59999 || exit 1