Open scottyeager opened 1 year ago
Depending on the route we take for host keys, shared files among images could be reduced to just the unit file that launches sshd
, thus making this issue less relevant.
Edit: while host key handling will be done by Zos/cloud-container, using base images to factor out common code and get it right once is still worthwhile.
After working a bit on updating all images to mitigate the host keys issue, I've generated some additional insights:
FROM ubuntu:*
. Replacing these with our Ubuntu base variant can eliminate boilerplate and ensure that SSH is setup correctly in all images, using a normal Docker workflowVAR
So my updated proposal is as follows:
ubuntu:*
based solutions derive from our base Ubuntu images, and remove boilerplate which has become duplicatedubuntu:*
(just debian
and wordpress
?), link in the boilerplate files as originally suggestedI've implemented the ideas from my last comment in this repo (keeping it separate to avoid package clutter).
A couple more insights from this work:
FROM
one of our Ubuntu images built from the deb/apt base Dockerfile)busybox
inside the base images so it's possible to do a quick ping
or ip a
without needing to download more packages (some images are shipping utilities like ping for solutions that users will likely never login to). busybox
provides wget
, which images are typically using to download zinit
, while being smaller than wget
, so it's a net win.
Currently most or all of the images include
sshd
along with an init script to set the authorized key and azinit
unit file to run both the script and daemon. This means that the implementations can diverge, and even in the best case that they are consistent, its difficult to maintain and implement a change across all images such as for #165.Edit: removed original plan in favor of proposal outlined below.