2016-12-08 22:11:13 +00:00
|
|
|
FROM alpine
|
|
|
|
# TODO: redo as cross platform, and without git etc :)
|
|
|
|
|
2016-12-19 02:12:14 +00:00
|
|
|
ARG VERSION
|
|
|
|
ARG KERNEL_VERSION
|
|
|
|
ENV VERSION=${VERSION}
|
|
|
|
ENV KERNEL_VERSION=${KERNEL_VERSION}
|
|
|
|
|
2016-12-20 12:49:34 +00:00
|
|
|
# not installed atm udev, grub2, kexe-tools
|
2016-12-08 22:11:13 +00:00
|
|
|
# parted: partprobe, e2fsprogs: mkfs.ext4, syslinux: extlinux&syslinux
|
2017-03-31 12:15:15 +00:00
|
|
|
# e2fsprogs-extra: chattr
|
|
|
|
RUN apk --no-cache add syslinux parted e2fsprogs e2fsprogs-extra util-linux
|
2016-12-08 22:11:13 +00:00
|
|
|
|
|
|
|
COPY conf /scripts/
|
2016-12-19 02:12:14 +00:00
|
|
|
COPY ./build/ros /bin/
|
2016-12-20 12:49:34 +00:00
|
|
|
#RUN cd /bin && ln -s ./ros ./system-docker
|
2016-12-19 02:12:14 +00:00
|
|
|
#OR softlink in the host one - this image should only be used when installing from ISO..
|
|
|
|
# (except its useful for testing)
|
|
|
|
# && ln -s /host/usr/bin/ros /bin/
|
2017-03-30 03:01:50 +00:00
|
|
|
COPY kexec/dist/sbin/kexec /sbin/
|
2016-12-19 02:12:14 +00:00
|
|
|
|
|
|
|
RUN ln -s /bootiso/boot/ /dist
|
2016-12-08 22:11:13 +00:00
|
|
|
|
2017-01-18 00:50:37 +00:00
|
|
|
# need to make a /scripts/set-disk-partitions so that older releases can call the installer
|
|
|
|
RUN echo "#!/bin/sh" > /scripts/set-disk-partitions \
|
|
|
|
&& echo "echo 'set-disk-partitions deprecated'" >> /scripts/set-disk-partitions \
|
|
|
|
&& chmod 755 /scripts/set-disk-partitions
|
|
|
|
|
2017-01-18 01:44:42 +00:00
|
|
|
# work around some really weird ros symptoms
|
|
|
|
RUN rm -rf /sbin/poweroff /sbin/shutdown /sbin/reboot /sbin/halt /usr/sbin/poweroff /usr/sbin/shutdown /usr/sbin/reboot /usr/sbin/halt
|
|
|
|
|
2016-12-20 12:49:34 +00:00
|
|
|
ENTRYPOINT ["/bin/ros", "install"]
|
2016-12-08 22:11:13 +00:00
|
|
|
|