├── Dockerfile ├── README.md ├── gui └── start.sh /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM chinch/fc24 2 | 3 | WORKDIR /root/Downloads 4 | 5 | RUN dnf -y update && dnf -y install Xorg gnome-shell xorg-x11-drivers mesa-dri-drivers glx-utils sudo fish xcalib socat pavucontrol libXxf86vm libXrandr firefox gnome-terminal passwd pulseaudio docker docker-compose atomic wget lxterminal pulseaudio-utils && dnf -y clean all 6 | 7 | RUN (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/*; 8 | 9 | RUN rm -rf /etc/systemd/system/systemd-remount-fs.service; rm -rf /etc/systemd/system/systemd-journald.socket; rm -rf /etc/systemd/system/systemd-journald.service; rm -rf /etc/systemd/system/systemd-journald-dev-log.socket; rm -rf /etc/systemd/system/systemd-journald-audit.socket; rm -rf /etc/systemd/system/systemd-journal-flush.service; ln -s /dev/null /etc/systemd/system/systemd-remount-fs.service; ln -s /dev/null /etc/systemd/system/systemd-journald.socket; ln -s /dev/null /etc/systemd/system/systemd-journald.service; ln -s /dev/null /etc/systemd/system/systemd-journald-dev-log.socket; ln -s /dev/null /etc/systemd/system/systemd-journald-audit.socket; ln -s /dev/null /etc/systemd/system/systemd-journal-flush.service; rm -rf /etc/systemd/system/upower.service; rm -rf /etc/systemd/system/systemd-logind.service; ln -s /usr/lib/systemd/system/upower.service /etc/systemd/system/upower.service; ln -s /usr/lib/systemd/system/system-logind.service /etc/systemd/system/systemd-login.service; 10 | 11 | RUN mkdir -p /run/udev; mkdir -p /run/dbus; mkdir -p /run/systemd/system 12 | 13 | RUN cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime 14 | 15 | RUN adduser rancher ; usermod -aG video rancher ; usermod -aG audio rancher ; groupadd sudo ; usermod -aG sudo rancher ; groupadd docker ; usermod -aG docker rancher 16 | 17 | RUN sed -e 's/^root.*/root\tALL=(ALL)\tALL\nrancher\tALL=(ALL)\tALL/g' /etc/sudoers > /etc/sudoers.new ; mv /etc/sudoers.new /etc/sudoers 18 | 19 | RUN cat /etc/bashrc | sed 's/\(.*PROMPT_COMMAND=\).*033K.*/\1'"'"'PRINTF "\\033];%S@%S:%S\\033\\\\" "${USER}" "${HOSTNAME%%.*}" "${PWD\/#$HOME\/~}"'"'"'/g' > /etc/tmp; mv /etc/tmp /etc/bashrc 20 | 21 | RUN echo '12345678900987654321234567890987' > /etc/machine-id 22 | 23 | ADD gui /usr/bin 24 | 25 | RUN chmod +x /usr/bin/gui 26 | 27 | ENTRYPOINT /usr/bin/gui 28 | 29 | 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rancher-workstation 2 | Desktop containers for RancherOS 3 | 4 | 99.999% of the work here was initail masterfully done by a fellow named TJ from RedHati just wrote a few simple bits to automate the process a little.. I wish I could find more info on him to thank him and give him proper credit for the unbelieable job he did on this project. This was/is a pretty big deal back then this wasnt done last week it was done went Docker and project atomic were very new almost beta. He figured out how to do what everyone wanted to do before they even knew they wanted to. Cant say enough about his achievment - unbeilevable! 5 | 6 | Heres a link to a pdf he published some years back. It will walk you threw the whole process and explain everything. He uses Fedora atomic it is the same config on Fedora Atomic and RancherOS. Ive got the dockerfile for the squid image I ill try to get it uploaded soon. Originally using RancherOS you had to mount the cgroup first or it would not work you also has to init systemd when using the fedora image for rancheros. Im not sure if either is a requirment now. If you have any questions dont hesitate to ask - cheers! 7 | 8 | 9 | https://lists.projectatomic.io/projectatomic-archives/atomic-devel/2015-June/pdfTIh2rTGNDA.pdf 10 | -------------------------------------------------------------------------------- /gui: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /usr/lib/systemd/systemd --system & 4 | sleep 10s 5 | chmod a+w /var/run/dbus/system_bus_socket 6 | X & 7 | export DISPLAY=":0" 8 | gnome-session 9 | -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo mkdir /sys/fs/cgroup/systemd 4 | sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd 5 | --------------------------------------------------------------------------------