Difference between revisions of "Docker Best Practices"

From Gcube Wiki
Jump to: navigation, search
(Repositories)
Line 1: Line 1:
= Repositories =
+
= Docker Repositories =
 
Setting up a DTR or Docker Hub?
 
Setting up a DTR or Docker Hub?
 
Single User vs Organization?
 
Single User vs Organization?
 +
 +
= Layout of a Docker-enabled Project =
  
 
= Dockerfile =
 
= Dockerfile =

Revision as of 16:51, 14 August 2020

Docker Repositories

Setting up a DTR or Docker Hub? Single User vs Organization?

Layout of a Docker-enabled Project

Dockerfile

Where to keep the Dockerfile

Base/Composed Images

Which ones we can use? Which repos/organizations do we trust?

Use Metadata Labels

Define the Maintainers

Which Users inside the Image

Define the App Name

Define the WORKDIR

Use COPY instead of ADD

Minimize the Image Size

Build the Image

Tags

Use fixed tags for immutability.

Automate

Push

Test the Images

Find, Fix and Monitor for Image Vulnerabilities