Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tisonkun opened this issue Jul 18, 2022 · 6 comments · Fixed by #17148
Closed

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

tisonkun opened this issue Jul 18, 2022 · 6 comments · Fixed by #17148

Comments

@tisonkun
Copy link
Member

tisonkun commented Jul 18, 2022

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.

@lhotari
Copy link
Member

lhotari commented Jul 19, 2022

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.

@tisonkun
Copy link
Member Author

Related PR #16099.

@merlimat
Copy link
Contributor

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

@xiaods
Copy link

xiaods commented Aug 15, 2022

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

@hpvd
Copy link

hpvd commented Aug 15, 2022

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

@tisonkun
Copy link
Member Author

@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
Labels
None yet
Projects
None yet
5 participants