Migrate using Docker's AI-powered assistant
You can use Docker's AI-powered assistant, to automatically migrate your Dockerfile to use Docker Hardened Images (DHI).
- Ensure Docker's AI-powered assistant is enabled.
- In the assistant's Toolbox, ensure the Developer MCP Toolkit is enabled.
- In the terminal, navigate to the directory containing your Dockerfile.
- Start a conversation with the assistant:
docker ai - Type:
"Migrate my dockerfile to DHI" - Follow the conversation with the assistant. The assistant will edit your Dockerfile, so when
it requests access to the filesystem and more, type
yesto allow the assistant to proceed.
When the migration is complete, you see a success message:
The migration to Docker Hardened Images (DHI) is complete. The updated Dockerfile
successfully builds the image, and no vulnerabilities were detected in the final image.
The functionality and optimizations of the original Dockerfile have been preserved.ImportantAs with any AI tool, you must verify the assistant's edits and test your image.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
