jpetazzo / container.training

Slides and code samples for training, tutorials, and workshops about Docker, containers, and Kubernetes.
http://container.training/
Other
3.64k stars 1.59k forks source link

Check for missing docker dir #625

Closed BretFisher closed 1 year ago

BretFisher commented 1 year ago

Docker v23 no longer creates the /etc/docker/ directory, so we need to create it and don't error if it already exists (for older versions).

thaJeztah commented 1 year ago

We were discussing this, and the /etc/docker directory was previously created as a side-effect of a legacy functionality for schema 2 v1 images ("libtrust"), which created a key.json in this path.

In general, I think this is the correct fix, as this directory is not guaranteed to be present (it's an optional path to store config files). That said, we'll make a change in the .deb and .rpm packages to automatically create an empty directory on installation;

jpetazzo commented 1 year ago

Good catch, thank you! <3