Skip to content

Build the docker image without dockerfile-maven-plugin #16652

Closed

Description

@tisonkun

As described in #16642, dockerfile-maven-plugin doesn't support Apple M1 and the project itself is end-of-life.

For supporting developers using Apple M1 clip, we can migrate the building logic to other plugin. Here's some candidates:

  • docker-maven-plugin is provided by fabric8io and actively maintained. However, the plugin logic is quite different from dockerfile-maven-plugin as the former may be over fruitful.
  • maven-exec-plugin. dockerfile-maven-plugin is effectively a thin wrapper of docker commands. We may directly run those commands with maven-exec-plugin.
  • A makefile. Apache SkyWalking uses a Makefile to hold logics about building docker image. It should be in the same direction with maven-exec-plugin but switches build system switch to Makefile.

cc @lhotari what do you think? At least I'd like to know the effectively executed docker commands so that I can run from command line interface and build those images manually.

Activity

  1. lhotari commented on Jul 19, 2022

    @lhotari
    Member

    cc @lhotari what do you think? At least I'd like to know the effectively executed docker commands so that I can run from command line interface and build those images manually.

    @tisonkun I'd prefer the maven-exec-plugin solution.

  2. tisonkun commented on Jul 20, 2022

    @tisonkun
    MemberAuthor

    Related PR #16099.

  3. merlimat commented on Jul 20, 2022

    @merlimat
    Contributor

    The next step after this would be to enable building multi-arch image :)

  4. xiaods commented on Aug 15, 2022

    @xiaods

    use Jib — build Java Docker images better to build your image.

  5. hpvd commented on Aug 15, 2022

    @hpvd

    since it's about the future evolutions of the docker images in this issue,
    maybe one should already also have a look on the topic distroless images:
    just put together a short doc with background and sources about

    • the typical advantages and
    • the latest gen of tooling
    • debugging distroless images

    in the pulsar function-mesh project
    where it may directly help to solve some security problems in an image:
    Build distroless package for better security, smaller size, speed and more streamnative/function-mesh#448

  6. tisonkun commented on Aug 17, 2022

    @tisonkun
    MemberAuthor

    @xiaods with a quick glance of Jib, it seems a Java-specific image builder based on buildkit. Our logic is currently based on Dockerfile so I don't want to spend too much time learning a new flavor.

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