scaleway-image-archlinux/Dockerfile

95 lines
2.0 KiB
Docker
Raw Normal View History

2014-12-18 11:30:58 +01:00
## -*- docker-image-name: "armbuild/ocs-distrib-archlinux:latest" -*-
FROM armbuild/archlinux-disk:2014-12-02
2014-12-21 10:23:46 +01:00
MAINTAINER Online Labs <opensource@ocs.online.net> (@online_en)
# Environment
ENV OCS_BASE_IMAGE armbuild/ocs-archlinux:2014-12-02
# Install packages
RUN pacman -Sy --noconfirm \
bash-completion \
cronie \
curl \
dhcpcd \
2015-01-30 17:39:34 +01:00
dnsutils \
file \
htop \
iptables \
less \
2015-01-30 15:02:54 +01:00
localepurge \
lsb-release \
man \
mg \
nano \
nbd \
2015-01-30 14:40:13 +01:00
networkmanager \
ntp \
openbsd-netcat \
openssh \
rsync \
rsyslog \
screen \
socat \
sudo \
2015-01-30 14:40:13 +01:00
tmux \
vim \
2015-01-30 14:40:13 +01:00
wget
# xnbd-client
RUN mkdir /tmp/build-xnbd \
&& cd /tmp/build-xnbd \
&& wget https://bitbucket.org/hirofuchi/xnbd/downloads/xnbd-0.3.0.tar.bz2 -O xnbd.tar.bz2 \
&& tar -xf xnbd.tar.bz2 \
&& cd xnbd-* \
&& pacman -Sy --noconfirm gcc automake pkg-config make \
&& cd /tmp/build-xnbd/xnbd-* \
&& ./configure --prefix=/usr/local \
&& make -j4 \
&& make install \
&& pacman -R --noconfirm gcc automake pkg-config make \
&& cd / \
&& rm -rf /tmp/build-xnbd /tmp/xnbd.tar.bz2
# Locales
RUN sed -e s/^\#en_US.UTF-8/en_US.UTF-8/ -i /etc/locale.gen \
&& locale-gen
2014-12-18 11:50:02 +01:00
# Systemd
RUN systemctl disable getty@tty1.service \
&& systemctl disable systemd-networkd.service \
2014-12-19 11:03:16 +01:00
&& systemctl enable NetworkManager-wait-online.service \
&& systemctl enable serial-getty@ttyS0.service \
&& systemctl enable sshd.service \
&& systemctl enable NetworkManager \
&& systemctl enable ntpdate
2015-01-30 16:29:08 +01:00
# packages upgrade
RUN pacman --noconfirm -Suy
# Patch rootfs
RUN wget -qO - http://j.mp/ocs-scripts | bash
ADD ./patches/etc/ /etc/
ADD ./patches/usr/ /usr/
2015-01-30 16:29:08 +01:00
# Enable Online-Labs services
2014-12-19 11:03:16 +01:00
RUN systemctl enable oc-ssh-keys \
&& systemctl enable oc-add-extra-volumes \
&& systemctl enable oc-sync-kernel-modules
# Cleanup
2015-01-30 16:29:08 +01:00
RUN pacman-db-upgrade \
&& pacman -Rns linux-armv7 --noconfirm \
&& pacman -Sc --noconfirm \
&& rm -rf /var/cache/pacman/pkg \
&& localepurge-config && localepurge \
&& pacman-db-upgrade