Last active
October 13, 2019 05:12
-
-
Save nobiit/d37ab52954c6151615a2ec8853be0181 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.3 | |
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 && \ | |
echo "@edge http://dl-4.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \ | |
# read packages and update | |
apk update && apk upgrade && \ | |
# fix old apk-tools | |
apk add --upgrade apk-tools@edge && \ | |
# add packages | |
apk add ca-certificates rsyslog logrotate runit@community && \ | |
# Make info file about this build | |
mkdir -p /etc/BUILDS/ && \ | |
printf "Build of nimmis/alpine-micro:3.3, 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"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment