-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
48 lines (40 loc) · 1.67 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
FROM alpine:3.15
MAINTAINER nimmis <[email protected]>
COPY root/. /
RUN echo "@community http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
# read packages and update
apk update && apk upgrade && \
# add packages
apk add ca-certificates rsyslog logrotate runit && \
# Make info file about this build
mkdir -p /etc/BUILDS/ && \
printf "Build of nimmis/alpine-micro:3.15, date: %s\n" `date -u +"%Y-%m-%dT%H:%M:%SZ"` > /etc/BUILDS/alpine-micro && \
# install extra from github, including replacement for process 0 (init)
# add extra package for installation
apk add curl && \
cd /tmp && \
# Install utils and init process
curl -Ls https://github.com/nimmis/docker-utils/archive/master.tar.gz | tar xfz - && \
./docker-utils-master/install.sh && \
rm -Rf ./docker-utils-master && \
# Install backup support
curl -Ls https://github.com/nimmis/backup/archive/master.tar.gz | tar xfz - && \
./backup-master/install.sh all && \
rm -Rf ./backup-master && \
# remove extra packages
apk del curl && \
# fix container bug for syslog
sed -i "s|\*.emerg|\#\*.emerg|" /etc/rsyslog.conf && \
sed -i 's/$ModLoad imklog/#$ModLoad imklog/' /etc/rsyslog.conf && \
sed -i 's/$KLogPermitNonKernelFacility on/#$KLogPermitNonKernelFacility on/' /etc/rsyslog.conf && \
# remove cached info
rm -rf /var/cache/apk/*
# Expose backup volume
VOLUME /backup
# Set environment variables.
ENV HOME /root
# Define working directory.
WORKDIR /root
# Define default command.
CMD ["/boot.sh"]