Skip to content

✨ Import an image from host and use it as base image to build from a Dockerfile #8677

Closed

Description

@dirodriguezm

What are you trying to do?

The goal would be to import an image using dag.Container().Import(baseImage) and use that baseImage in a FROM statement in a Dockerfile.

Why is this important to you?

Sometimes, instead of rewriting a Dockerfile using Dagger SDK, it's easier to just build from a Dockerfile. But if this Dockerfile uses a base image that's only available locally, then it can't be built, since the local image is not available to the Dagger engine.

How are you currently working around this?

I think either rewriting the Dockerfile using the Dagger SDK instead or putting the local image on a remote registry should work.

Activity

  1. RyanGuild-us-ignite commented on Feb 11, 2026

    @RyanGuild-us-ignite

    This is important to me as an ops person because often the software I need to build comes with a Dockerfile that I do not control. Even if this is a Docker anti-pattern, Dagger should support it because it's a sharp edge for users:

    even if I export-image, I can't use it in a build.

  2. locked and limited conversation to collaborators on Mar 24, 2026
  3. converted this issue into a discussion #12153 on Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions