Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.
/ container-demo Public archive

This repository contains a couple of container demos for authoring effective docker images.

Notifications You must be signed in to change notification settings

bogdanbarna/container-demo

Repository files navigation

Container Demo


Table of Contents generated with DocToc


About

This repository contains a couple of container demos meant for consumption by 3Pillar Global's internal DevOps Community of Practice.

Usage

For building this Docker image, the following will do:

docker build . -t devops-cop-container-demo

For added benefit, export DOCKER_BUILDKIT=1 before the build to use buildkit, the new build backend.

For installing pre-commit hooks, run:

pre-commit install

For running hadolint, dockle, and trivy, the scripts directory contains wrapper bash scripts to all three, e.g.

scripts/trivy_wrapper.sh devops-cop-container-demo

As CICD good practices,

Enabling Docker Content Trust is normally recommended, but as mentioned in this open issue it does not work with locally built images.

Misc

Always clean up after yourself:

docker system prune -a

(Note: be mindful about running this on production systems, though.)