I just learned docker and would like to ask two questions about writing dockefile.
1. Many examples of dockerfile writing on the Internet are based on ubuntu, apt-get installation, and centos yum installation is rare. Why?
2. The same is an example, such as
# Add the package verification key RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
I know this sentence is to add keys, and some keys are relatively long (573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62). I want to know where these keys are generated.
Thanks.
1. Based on Ubuntu, because Ubuntu will be much smaller than centos when reduced. Currently, more of them have been transferred to the alpine Linux distribution. Because of container technology, other useless consumption needs to be reduced as much as possible.
apt-key is used to manage the list of keys used by apt packages for authentication. Packages that have been authenticated with these keys will be considered trusted.
http://man.he.net/man8/apt-key
1. It depends on personal preference. In addition, I feel that the Debian system is relatively lightweight and the image size is relatively small.
2. You can find out by searching gpg