diff --git a/Dockerfile b/Dockerfile index 54d081f..373f0dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,33 +24,15 @@ RUN pacman -Sy --noconfirm \ wget -# sudo umount $TARGET/{sys,dev,proc} || true -# sudo mount -t proc proc $TARGET/proc -# sudo mount -t sysfs sys $TARGET/sys -# sudo mount -o bind /dev $TARGET/dev -# do_in_target 'sed s/root:[^:]\+:/root:x:/ -i /etc/shadow' -# sudo mkdir -p $TARGET/run/systemd/resolve -# sudo cp /etc/resolv.conf $TARGET/run/systemd/resolve/resolv.conf -# do_in_target 'curl https://raw.githubusercontent.com/online-labs/ocs-scripts/master/upgrade_root.bash | bash' -# patch_target archlinux/patches -# sudo mkdir -p $TARGET/root/.ssh -# sudo cp -va /root/.ssh/authorized_keys $TARGET/root/.ssh -# echo $LOCALES | sed 's/,/\n/' | while read loc; do -# do_in_target "sed -e s/^\#${loc}/${loc}/ -i /etc/locale.gen" -# done -# do_in_target locale-gen -# do_in_target "systemctl enable sshd.service" -# do_in_target "systemctl disable getty@tty1.service" -# do_in_target "systemctl enable serial-getty@ttyS0.service" -# sudo rm -f $TARGET/run/systemd/resolve/resolv.conf -# sudo umount $TARGET/{sys,dev,proc} || true -# sudo umount $TARGET/{sys,dev,proc} || true -# sudo mount -t proc proc $TARGET/proc -# sudo mount -t sysfs sys $TARGET/sys -# sudo mount -o bind /dev $TARGET/dev -# sudo cp /etc/resolv.conf $TARGET/run/systemd/resolve/resolv.conf -# do_in_target "pacman --noconfirm -Suy" -# sudo rm -f $TARGET/run/systemd/resolve/resolv.conf +# Locales +RUN sed -e s/^\#en_US.UTF-8/en_US.UTF-8/ -i /etc/locale.gen \ + && locale-gen + + +# Systemd +RUN systemctl enable sshd.service \ + && systemctl disable getty@tty1.service \ + && systemctl enable serial-getty@ttyS0.service # Patch rootfs @@ -58,6 +40,10 @@ RUN wget -qO - http://j.mp/ocs-scripts | bash ADD ./patches/etc/ /etc/ +# packages upgrade +RUN pacman --noconfirm -Suy + + # TEMPORARY DEBUG ACCESS RUN echo root:toor2 | chpasswd RUN umask 077; mkdir /root/.ssh; echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApvPvDbWDY50Lsx4WyUInw407379iERte63OTTNae6+JgAeYsn52Z43Oeks/2qC0gxweq+sRY9ccqhfReie+r+mvl756T4G8lxX1ND8m6lZ9kM30Rvk0piZn3scF45spmLNzCNXza/Hagxy53P82ej2vq2ewXtjVdvW20G3cMHVLkcdgKJN+2s+UkSYlASW6enUj3no+bukT+6M8lJtlT0/0mZtnBRJtqCCvF0cm9xU0uxILrhIfdYAJ1XqaoqIQLFSDLVo5lILMzDNwV+CfAotRMWIKvWomCszhVQYHCQo2Z+b2Gs0TL4DRb23fRMdeaRufnVhh5ZMlNkb2ajaL6sw== m" >> /root/.ssh/authorized_keys ; echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYQAd3JDHyDnlojqmKlVgoHYEawYKS6NIq1y81PauHPn6v8lHGSjEkcPhl1kf39+dze/NmoLEGowyjpYH6Tc7XJ1z4FQDtgdAMCL5n+cBwd1H1MFAIbFJAtLsno5HUIbO6fhUKx6nKrdUodakPS7yBiCLDUT7uuxX12WhtJAJUlNJj9Cd3o2kWYYfF12AVA0dfT8Rzsbr5JA2IRlrasyisDJxQQ00T6SWEVaJRwPFK7Ipcrqrw+XeYOAeq2Mx8/25ybsbwjXaP6N+R6xCD7Wq0JoiYpzx/qE0lD3JQShQNYPbYfYkKWoVwibKk/W3Xy1QtrPdwUXET+0SssqDxdGHt" >> /root/.ssh/authorized_keys