Madhu Akula
A practical guide to writing secure Dockerfiles
#1about 2 minutes
Why Dockerfile security is a critical foundation
Dockerfiles act as the blueprint for container images, making their security essential for preventing supply chain attacks and infrastructure compromise.
#2about 5 minutes
Following official Docker best practices for images
Start with small base images, use multi-stage builds, and manage the build context with a .dockerignore file to create efficient and secure containers.
#3about 4 minutes
Advanced security practices for hardening Dockerfiles
Enhance security by running containers as a non-root user, using COPY instead of ADD, avoiding hardcoded secrets, and pulling from trusted image registries.
#4about 4 minutes
Using Docker BuildKit to handle secrets securely
Docker's BuildKit allows mounting secrets and forwarding SSH agents during the build process, preventing sensitive credentials from being stored in image layers.
#5about 5 minutes
Automating checks with linters like Hadolint and Dockle
Use automated linters like Hadolint for best practices and Dockle for CIS benchmark compliance to enforce security standards in your CI/CD pipeline.
#6about 2 minutes
Reducing attack surface with Docker-slim
Docker-slim minifies container images by removing unnecessary files and can automatically generate seccomp and AppArmor profiles to harden runtime security.
#7about 3 minutes
Analyzing image layers for security with Dive
The Dive tool provides a layer-by-layer inspection of a Docker image, helping to identify inefficiencies and potential security risks like backdoors.
#8about 4 minutes
Introducing Open Policy Agent for custom policies
Open Policy Agent (OPA) and its language Rego provide a general-purpose engine for enforcing custom, organization-specific security policies on structured data like Dockerfiles.
#9about 6 minutes
Writing custom Dockerfile policies with Conftest
Leverage Conftest to write and apply custom Rego policies that validate Dockerfiles against specific organizational rules, such as only allowing images from a trusted private registry.
#10about 2 minutes
Next steps for implementing Dockerfile security
Implement security best practices early using linters in your IDE, integrate automated checks into CI/CD pipelines, and create standardized custom policies for your organization.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
13:51 MIN
Using containers to improve security and deployment
DevSecOps: Security in DevOps
56:21 MIN
Security best practices for containers and Kubernetes
Microservices: how to get started with Spring Boot and Kubernetes
11:13 MIN
Hardening the CI/CD pipeline with automated security tools
You can’t hack what you can’t see
18:43 MIN
Improving security and performance with small container images
5 steps for running a Kubernetes environment at scale
42:42 MIN
Future plans for advancing to a DevSecOps model
Enabling automated 1-click customer deployments with built-in quality and security
05:30 MIN
Securing developer access and development tools
Securing your application software supply-chain
24:21 MIN
Practical ideas for containerizing code and documentation tasks
Reusing apps between teams and environments through Containers
04:17 MIN
Using open source tools to secure the entire SDLC
Open Source Secure Software Supply Chain in action
Featured Partners
Related Videos
Reusing apps between teams and environments through Containers
Adrian Kosmaczewski
Securing Your Web Application Pipeline From Intruders
Milecia McGregor
Enabling automated 1-click customer deployments with built-in quality and security
Christoph Ruggenthaler
Enhancing Workload Security in Kubernetes
Dimitrij Klesev & Andreas Zeissner
Walking into the era of Supply Chain Risks
Vandana Verma
Turning Container security up to 11 with Capabilities
Mathias Tausig
Hacking Kubernetes: Live Demo Marathon
Andrew Martin
DevSecOps: Security in DevOps
Aarno Aukia
From learning to earning
Jobs that call for the skills explored in this talk.


DevOps Engineer – Kubernetes & Cloud (m/w/d)
epostbox epb GmbH
Berlin, Germany
Intermediate
Senior
DevOps
Kubernetes
Cloud (AWS/Google/Azure)
Devops Engineer * Kubernetes * Java * ELK * Angular
DC&I
The Hague, Netherlands
Java
DevOps
Gitlab
Angular
Openshift
+3
{\"@context\":\"https://schema.org/\",\"@type\":\"JobPosting\",\"title\":\"Devops Engineer Docker
IRIUM
Remote
DevOps
Docker
Continuous Integration
Ansible Docker Editeur Google Cloud KUBERNETES TERRAFORM
Silkhom
Bron, France
Remote
€50-65K
Senior
Bash
Azure
DevOps
+10
100**Remote - Devops Engineer (m/w/d) Docker, Kubernetes, CI/CD
APRIORI - business solutions AG
Berlin, Germany
Kafka
DevOps
Docker
VMware
Kubernetes
+3
DevOps Security Engineer with Golang Development Focus (m/f/d)
SAP AG
Sankt Leon-Rot, Germany
Junior
Go
Azure
DevOps
Puppet
Docker
+6
Site Reliability Engineer - Linux Ubuntu - Docker - Ansible
Opus Recruitment Solutions
Oxford, United Kingdom
€65K
Linux
DevOps
Python
Docker
+3


