Skip to content

Use multi-stage builds to make lightweight docker image #541

@foriequal0

Description

@foriequal0

From Docker 17.05, Dockerfile can contains two or more FROM statements. Each FROM statements make new fresh stages, and can fetch build artifacts from previous named stages. We can make smaller images by removing build dependencies including only runtime dependencies in final stage.

docs: https://docs.docker.com/develop/develop-images/multistage-build/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions