Docker tags for security
We've just seen how we can make sure we are sharing secrets securely between containers in a swarm. In Chapter 12, Introduction to Container Security, we gained an appreciation for how to use tags combined with other security features, to ensure we use the correct image.
Now, we'll see how these two worlds can intersect by using tags with secrets and labels so we can annotate which environment a given secret and tag are used in.
As a good security practice, we should always use different secrets for different environments. For example, the passwords for database access in your development, staging, and production instances should not be the same. Typically, as part of your development process, you will likely be using newer versions of containers in research, development, and QA environments compared to production.
We can use Docker tags to help ensure that once we have credentials/secrets set up for a development environment, we are also...