Overview

migetpacks can build container images locally using your Docker socket. When OUTPUT_IMAGE does not contain a registry prefix, the built image stays on your local Docker daemon and is never pushed to a remote registry.

Prerequisites

  • Docker Desktop (Mac/Windows) or Docker Engine (Linux)
  • Docker daemon running
  • The migetpacks image pulled locally
migetpacks uses Docker-in-Docker internally. Docker Desktop on Mac and Windows handles this transparently through its Linux VM. No --privileged flag or special configuration is needed.

Building Locally

Mount your application source code and the Docker socket, then run migetpacks:
Then test the built image:
When OUTPUT_IMAGE does not contain a / with a registry domain (e.g., my-app:local vs registry.io/my-app:latest), the builder uses the local Docker daemon and the image will not be pushed.

Language Override

By default, migetpacks auto-detects the language. You can override this with the LANGUAGE environment variable:

Custom Environment Variables

Any environment variable not recognized by migetpacks is automatically injected into the generated Dockerfile as an ENV statement:

Debugging Tips

Inspect Built Image Contents

Check Environment Variables

View the Generated Dockerfile

The build output includes the generated Dockerfile content. Look for the Dockerfile.runtime section in the build logs.

Interactive Shell

If the build succeeds but the app does not start correctly, you can override the entrypoint:
DHI (Docker Hardened Images) containers are distroless and do not have a shell. You cannot use --entrypoint /bin/sh with DHI-built images. Use standard (non-DHI) builds for debugging.

Check Exposed Ports

Architecture Override

By default, migetpacks builds for x86_64. To build for a different architecture:

Source Mount Options