clean up override files, add inittab

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2015-12-02 12:50:06 +00:00
parent c01b1a7f3a
commit bc24228bc3
5 changed files with 25 additions and 3 deletions

View File

@ -2,11 +2,12 @@ FROM alpine:edge
MAINTAINER Justin Cormack <justin.cormack@unikernel.com>
COPY repositories /etc/apk/repositories
COPY motd hostname /etc/
COPY repositories /etc/apk
RUN apk update && apk upgrade && apk add e2fsprogs docker
COPY etc /etc/
RUN ln -s /bin/busybox /init
CMD ["/bin/sh"]

View File

@ -1,6 +1,6 @@
all: initrd.img
initrd.img: Dockerfile hostname repositories motd
initrd.img: Dockerfile repositories etc/hostname etc/motd etc/inittab
rm -f initrd.img
docker build -t moby:test .
docker run -i -v $(PWD):/export moby:test /export/mkinitrd.sh

21
alpine/etc/inittab Normal file
View File

@ -0,0 +1,21 @@
# /etc/inittab
::sysinit:/sbin/rc sysinit
::wait:/sbin/rc default
# Set up a couple of getty's
#tty1::respawn:/sbin/getty 38400 tty1
#tty2::respawn:/sbin/getty 38400 tty2
#tty3::respawn:/sbin/getty 38400 tty3
#tty4::respawn:/sbin/getty 38400 tty4
#tty5::respawn:/sbin/getty 38400 tty5
#tty6::respawn:/sbin/getty 38400 tty6
# Put a getty on the serial port
ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
::shutdown:/sbin/rc shutdown