-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 826 Bytes
/
Dockerfile
File metadata and controls
36 lines (24 loc) · 826 Bytes
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
FROM alpine:3.10
LABEL maintainer "publicarray"
LABEL description "High-performance NTP server written in Rust. https://github.com/mlichvar/rsntp"
ENV REVISION 1
ENV BUILD_DEPS rust cargo git
RUN apk add --no-cache $BUILD_DEPS
RUN set -x && \
cd /tmp && \
git clone https://github.com/mlichvar/rsntp && \
cd rsntp && \
cargo build --release && \
cp target/release/rsntp /usr/local/bin/rsntp
#------------------------------------------------------------------------------#
FROM alpine:3.9
ENV RUN_DEPS libgcc runit shadow curl
RUN apk add --no-cache $RUN_DEPS
COPY --from=0 /usr/local/bin/rsntp /usr/local/bin/rsntp
RUN set -x && \
groupadd _rsntp && \
useradd -g _rsntp -s /dev/null -d /dev/null _rsntp
COPY entrypoint.sh /
EXPOSE 123/udp
RUN rsntp --help
ENTRYPOINT ["/entrypoint.sh"]