# FROM fedora:27
# MAINTAINER "Antony Antony" <antony@phenome.org>
# ENV container docker
# RUN dnf -y update;
RUN dnf -y update
RUN dnf -y install systemd; \
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
# these first. If install breaks docker image will start, can debug.
VOLUME [ "/sys/fs/cgroup" ]
CMD ["/sbin/init"]
RUN dnf install -y dnf-plugins-core git openssh-server openssh-clients \
	vim-enhanced wget 
RUN dnf install -y @development-tools
RUN dnf builddep -y libreswan
RUN wget -O libreswan.spec https://raw.githubusercontent.com/libreswan/libreswan/master/packaging/fedora/libreswan.spec
RUN dnf builddep -y libreswan.spec
