Open queglay opened 4 years ago
After looking into it, I think
Using https for retrieving the key is simple and changes in two line are necessary:
&& DEBIAN_FRONTEND=noninteractive apt-get install -y gnupg ca-certificates \
&& apt-key adv --fetch-keys https://www.webmin.com/jcameron-key.asc \
The additional package 'ca-certificates' in line 3 is necessary to verify the certificate.
And this is the point which -in my opinion- breaks the two-stage-approach, if the url of the repository is changed to https:
Dockerfile
/etc/apt/sources
from stage 1 is copied to stage 2.apt-get update
.https://download.webmin.com
in this stage. But without this step it is not possible to add ca-certificates
to this stage (which is needed for running apt-get update
without error, which is needed to install ca-certificates
…). I think using https only for retrieving the key should be o.k.:
If you look into the /etc/apt/source.list
on your system, the urls for the repositories from Debian or Ubuntu are all "only" http.
If the url for the repository should also be switched to https then the concept have to be switched to one stage and the following changes have to be made:
AS …
This is more a question, but these lines below appear unsafe to me, are they?
Adding a key and repository without https opens up the possibility of installing packages from a MITM attack.