forked from zerotier/zeronsd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ubi
27 lines (21 loc) · 836 Bytes
/
Dockerfile.ubi
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
# vim: ft=dockerfile
FROM quay.io/centos/centos:stream9-minimal AS builder
COPY . .
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
ENV PATH=/root/.cargo/bin:${PATH}
RUN microdnf install -y --nodocs openssl-devel openssl-libs gcc
RUN cargo build --release
# to run:
#
# docker run --net host -it \
# -v /var/lib/zerotier-one/authtoken.secret:/authtoken.secret \
# -v <token file>:/token.txt \
# zeronsd:alpine start -s /authtoken.secret -t /token.txt \
# <network id>
FROM quay.io/centos/centos:stream9-minimal AS release
RUN microdnf install -y --nodocs --setopt=install_weak_deps=0 openssl-libs libgcc bind-utils sudo && \
microdnf clean all
# USER 1000
COPY --from=builder /target/release/ /usr/local/bin/
ENTRYPOINT [ "/usr/local/bin/zeronsd" ]
CMD [ "help" ]