-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
37 lines (25 loc) · 1.23 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
ARG version=3.20
FROM alpine:$version AS latest
LABEL maintainer="Martin Hasoň <[email protected]>"
ARG version
ENV TEMP=/tmp \
ENV=/etc/profile \
CLEAN="/var/cache/apk/:/tmp/" \
RAWEXEC="monit crond supervise sshd"
RUN adduser -u 1000 -S -s /bin/sh -G users user && echo "user:password" | chpasswd 2>/dev/null
COPY rootfs /
RUN sed -i "s/\$ALPINE_RELEASE/$([ 'edge' = "$version" ] && echo "$version" || echo "v$version")/g" /etc/apk/repositories \
&& [ 'edge' = "$version" ] && sed -i 's/@testing //' /etc/apk/repositories || echo "ok" >/dev/null \
&& apk add -u busybox-extras busybox-suid su-exec inotify-tools dropbear dropbear-scp dropbear-dbclient dropbear-convert ca-certificates flock gettext libc6-compat libintl tini monit nano \
&& mv /usr/bin/envsubst /usr/local/bin/ \
&& apk del gettext \
&& wget -O /bin/wait-for https://raw.githubusercontent.com/eficode/wait-for/v2.2.4/wait-for && chmod a+x /bin/wait-for \
&& clean
RUN chmod 600 /etc/monitrc
ENTRYPOINT [ "/docker-entrypoint.sh" ]
FROM latest AS build
LABEL maintainer="Martin Hasoň <[email protected]>"
ARG version
RUN apk --update upgrade \
&& apk add -u build-base make cmake automake autoconf libtool && clean
FROM latest