-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
43 lines (26 loc) · 1.24 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
ARG ALPINE_VERSION=3.16
FROM alpine:${ALPINE_VERSION} AS builder
WORKDIR /src
RUN apk update \
&& apk add wget gcc make libc-dev git \
&& wget https://www.noip.com/client/linux/noip-duc-linux.tar.gz \
&& tar xzf noip-duc-linux.tar.gz \
&& rm noip-duc-linux.tar.gz \
&& mv noip* noip_src \
&& git clone https://github.com/0xFireWolf/STUNExternalIP.git \
&& cd STUNExternalIP \
&& sed -i 's/#include <time.h>/#include <sys\/time.h>\n#include <time.h>/' STUNExternalIP.c \
&& make
WORKDIR noip_src
RUN make
FROM alpine:${ALPINE_VERSION}
RUN apk add --no-cache expect iputils \
&& if [ ! -d /usr/local/etc ]; then mkdir -p /usr/local/etc;fi \
&& mkdir /config
RUN addgroup noip && adduser -DH -G noip noip && chown noip /config
USER noip
WORKDIR /scripts/
COPY --from=builder /src/STUNExternalIP/STUNExternalIP /usr/local/bin
COPY --from=builder /src/noip_src/noip2 /usr/local/bin
COPY scripts/* /scripts/
ENTRYPOINT ["/scripts/start_commands.sh"]