You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by GitBox <gi...@apache.org> on 2020/08/20 10:01:01 UTC

[GitHub] [karaf] skitt commented on a change in pull request #1160: Feature/add build docker image multi-platform (OS/Arch)

skitt commented on a change in pull request #1160:
URL: https://github.com/apache/karaf/pull/1160#discussion_r473834347



##########
File path: assemblies/docker/README.md
##########
@@ -26,6 +26,10 @@ https://docs.docker.com/installation/
 Install the most recent stable version of docker-compose
 https://docs.docker.com/compose/install/
 
+If you want build the multi platform (OS/Arch) docker image, then you must install
+the [buildx](https://docs.docker.com/buildx/working-with-buildx/). You can install
+[Docker Desktop Edge](https://docs.docker.com/docker-for-mac/edge-release-notes/) release for getting the buildx.

Review comment:
       ```suggestion
   If you want to build multi-platform (OS/Arch) Docker images, then you must install
   [`buildx`](https://docs.docker.com/buildx/working-with-buildx/).
   On macOS, an easy way to install `buildx` is to install [Docker Desktop Edge](https://docs.docker.com/docker-for-mac/edge-release-notes/).
   ```

##########
File path: assemblies/docker/README.md
##########
@@ -48,6 +52,55 @@ you can configure it with the `KARAF_VERSION` arg:
 docker build --build-arg KARAF_VERSION=4.2.0 -t "karaf:4.2.0" karaf
 ```
 
+If you want to build the container for a specific version of Karaf and
+specific version of the platform and finally push on the docker hub repository,
+you can configure it with the command:

Review comment:
       ```suggestion
   If you want to build the container for a specific version of Karaf and
   specific version of the platform, and push the image to the Docker Hub repository,
   you can use this command (replacing the version, image name, and targets as appropriate):
   ```

##########
File path: assemblies/docker/build.sh
##########
@@ -21,11 +21,15 @@
 usage() {
   cat <<HERE
 Usage:
-  build.sh --from-local-dist [--archive <archive>] [--image-name <image>]
-  build.sh --from-release --karaf-version <x.x.x> [--image-name <image>]
+  build.sh --from-local-dist [--archive <archive>] [--image-name <image>] [--build-multi-platform <string array of platform>]
+  build.sh --from-release --karaf-version <x.x.x> [--image-name <image>] [--build-multi-platform <string array of platform>]
   build.sh --help
 
   If the --image-name flag is not used the built image name will be 'karaf'.
+  Check supported platform to build, you can verify with this command: docker buildx ls
+  The supported platform (OS/Arch) depend on image from build, in this case the 
+  image is openjdk:8u212-jre-alpine https://hub.docker.com/_/openjdk?tab=tags&page=1&name=8u212-jre-alpine

Review comment:
       ```suggestion
     Check the supported build platforms; you can verify with this command: `docker buildx ls`
     The supported platforms (OS/Arch) depend on the build's base image, in this case [`openjdk:8u212-jre-alpine`](https://hub.docker.com/_/openjdk?tab=tags&page=1&name=8u212-jre-alpine).
   ```

##########
File path: assemblies/docker/build.sh
##########
@@ -21,11 +21,15 @@
 usage() {
   cat <<HERE
 Usage:
-  build.sh --from-local-dist [--archive <archive>] [--image-name <image>]
-  build.sh --from-release --karaf-version <x.x.x> [--image-name <image>]
+  build.sh --from-local-dist [--archive <archive>] [--image-name <image>] [--build-multi-platform <string array of platform>]
+  build.sh --from-release --karaf-version <x.x.x> [--image-name <image>] [--build-multi-platform <string array of platform>]

Review comment:
       ```suggestion
     build.sh --from-local-dist [--archive <archive>] [--image-name <image>] [--build-multi-platform <comma-separated platforms>]
     build.sh --from-release --karaf-version <x.x.x> [--image-name <image>] [--build-multi-platform <comma-separated platforms>]
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org