Skip to content

modified commands to add docker a bit more streamlined/best practices

So, initially I was just going to replaces the \ at the end of the line with |, because you don't have to put a backslach at the end of line if there is a pipe character. Bash will just look for the next command if there is a pipe at the end.

Then I was running the commands ( I imagine that @Gamb1t was probably just following the docs for docker's docker-ce debian install guide ), but after taking a quick look at the commands there are a few places that I had seen to potentially optimize.

Initially I didn't like how it was spitting out the encrypted gpg contents to my console.

Screenshot_20210624_080631

So, I actually went to docker's documentation and noticed they used the -o flag for the gpg command so they don't have to output it to the terminal.

Also, I noticed that the key ( even in docker's documentation ) was outputting the key to the /usr/share location. Which is a non-standard location when a system administrator is making modifications to their system. That location is normally more for package maintainers. I normally had been using apt-key but since that is now deprecated I noticed all the other apt keys ( when I ran apt-key list were listed under /etc/apt/trusted.gpg.d/, so I think it would be more appropriate for people to place the key there. When I did that I had an inkling that I wouldn't need to provide the signed-by=/usr/share/keyrings/docker-ce-archive-keyring.gpg anymore, because it is in it's standard install location now, and I was right ( so I removed that ).

Then lastly I removed the arch=amd64 because apt is intelligent enough to choose the right architecture based on where it is architecture it installed on. So, it isn't necessary.

Let me know if there are any questions or any other needed clarity. Thanks for the awesome docs 🙂

Merge request reports

Loading