forked from coppit/docker-no-ip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (38 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
41
42
43
44
45
46
47
48
FROM alpine:3.7
MAINTAINER David Coppit <[email protected]>
ENV TERM=xterm-256color
RUN true && \
\
echo "http://dl-cdn.alpinelinux.org/alpine/v3.7/community" >> /etc/apk/repositories && \
apk --update upgrade && \
\
# Basics, including runit
apk add bash curl htop runit build-base && \
\
# Needed by our code
apk add expect libc6-compat && \
\
rm -rf /var/cache/apk/* && \
\
# RunIt stuff
adduser -h /home/user-service -s /bin/sh -D user-service -u 2000 && \
chown user-service:user-service /home/user-service && \
mkdir -p /etc/run_once /etc/service
# Boilerplate startup code
COPY ./boot.sh /sbin/boot.sh
RUN chmod +x /sbin/boot.sh
CMD [ "/sbin/boot.sh" ]
VOLUME ["/config"]
ADD https://www.noip.com/client/linux/noip-duc-linux.tar.gz /files/
RUN set -x \
&& chmod a+rwX /files \
&& tar -C /files -x -f /files/noip-duc-linux.tar.gz noip-2.1.9-1 \
&& make -C /files/noip-2.1.9-1 \
&& mv /files/noip-2.1.9-1/noip2 /files \
&& rm -rf /files/noip-2.1.9-1 /files/noip-duc-linux.tar.gz
COPY ["noip.conf", "create_config.exp", "/files/"]
# run-parts ignores files with "." in them
COPY parse_config_file.sh /etc/run_once/parse_config_file
RUN chmod +x /etc/run_once/parse_config_file
COPY noip.sh /etc/service/noip/run
RUN chmod +x /etc/service/noip/run