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/09/16 10:05:09 UTC

[GitHub] [karaf] skitt commented on a change in pull request #1190: Feature/optimize docker script and update docs

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



##########
File path: assemblies/docker/README.md
##########
@@ -33,30 +33,63 @@ On macOS, an easy way to install `buildx` is to install [Docker Desktop Edge](ht
 ## Build
 
 Images are based on the Docker official [AdoptOpenJDK 11 JRE Hotspot](https://hub.docker.com/_/adoptopenjdk?tab=tags&page=1&name=11-jre-hotspot) image. If you want to
-build the Karaf image run:
+build the Karaf image you have the following choices:
 
-```
-sh build.sh
+1. Create the docker image from the SNAPSHOT version (from local distribution)
+2. Create the docker image from an Apache Karaf archive, for example (apache-karaf-4.2.9.tar.gz)
+3. Create the docker image from a specific version of Apache Karaf
+
+If you run `build.sh` without arguments then you could see how to usage this command.
+
+```bash
+Usage:
+  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>]
+  build.sh --help
+
+  If the --image-name flag is not used the built image name will be 'karaf'.
+  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 [adoptopenjdk:11-jre-hotspot](https://hub.docker.com/_/adoptopenjdk?tab=tags&page=1&name=11-jre-hotspot).
 ```
 
-or
+For create the docker image from the SNAPSHOT version (from local distribution) 
+you can execute the below command. Remember that before you can successfully run 
+this command, you must have done the build of the project 

Review comment:
       ```suggestion
   To create the docker image from the SNAPSHOT version (from local distribution) 
   you can execute the command below. Remember that before you can successfully run 
   this command, you must build the project 
   ```

##########
File path: assemblies/docker/README.md
##########
@@ -33,30 +33,63 @@ On macOS, an easy way to install `buildx` is to install [Docker Desktop Edge](ht
 ## Build
 
 Images are based on the Docker official [AdoptOpenJDK 11 JRE Hotspot](https://hub.docker.com/_/adoptopenjdk?tab=tags&page=1&name=11-jre-hotspot) image. If you want to
-build the Karaf image run:
+build the Karaf image you have the following choices:
 
-```
-sh build.sh
+1. Create the docker image from the SNAPSHOT version (from local distribution)
+2. Create the docker image from an Apache Karaf archive, for example (apache-karaf-4.2.9.tar.gz)
+3. Create the docker image from a specific version of Apache Karaf
+
+If you run `build.sh` without arguments then you could see how to usage this command.
+
+```bash
+Usage:
+  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>]
+  build.sh --help
+
+  If the --image-name flag is not used the built image name will be 'karaf'.
+  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 [adoptopenjdk:11-jre-hotspot](https://hub.docker.com/_/adoptopenjdk?tab=tags&page=1&name=11-jre-hotspot).
 ```
 
-or
+For create the docker image from the SNAPSHOT version (from local distribution) 
+you can execute the below command. Remember that before you can successfully run 
+this command, you must have done the build of the project 
+(for example with the command `mvn clean install -DskipTests`). For more info
+you can read: [Building Apache Karaf](https://github.com/apache/karaf/blob/master/BUILDING.md#building-apache-karaf)
 
+```bash
+./build.sh --from-local-dist
 ```
-docker build -t karaf .
+
+For create the docker image from the local dist version but with the archive,
+you can execute the below command. Remember that before you can successfully run 
+this command.

Review comment:
       ```suggestion
   To create the docker image from the local dist version but with the archive,
   you can execute the command below. Remember that before you can successfully run 
   this command, you must build the project.
   ```

##########
File path: assemblies/docker/README.md
##########
@@ -33,30 +33,63 @@ On macOS, an easy way to install `buildx` is to install [Docker Desktop Edge](ht
 ## Build
 
 Images are based on the Docker official [AdoptOpenJDK 11 JRE Hotspot](https://hub.docker.com/_/adoptopenjdk?tab=tags&page=1&name=11-jre-hotspot) image. If you want to
-build the Karaf image run:
+build the Karaf image you have the following choices:
 
-```
-sh build.sh
+1. Create the docker image from the SNAPSHOT version (from local distribution)
+2. Create the docker image from an Apache Karaf archive, for example (apache-karaf-4.2.9.tar.gz)
+3. Create the docker image from a specific version of Apache Karaf
+
+If you run `build.sh` without arguments then you could see how to usage this command.
+
+```bash
+Usage:
+  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>]
+  build.sh --help
+
+  If the --image-name flag is not used the built image name will be 'karaf'.
+  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 [adoptopenjdk:11-jre-hotspot](https://hub.docker.com/_/adoptopenjdk?tab=tags&page=1&name=11-jre-hotspot).
 ```
 
-or
+For create the docker image from the SNAPSHOT version (from local distribution) 
+you can execute the below command. Remember that before you can successfully run 
+this command, you must have done the build of the project 
+(for example with the command `mvn clean install -DskipTests`). For more info
+you can read: [Building Apache Karaf](https://github.com/apache/karaf/blob/master/BUILDING.md#building-apache-karaf)
 
+```bash
+./build.sh --from-local-dist
 ```
-docker build -t karaf .
+
+For create the docker image from the local dist version but with the archive,
+you can execute the below command. Remember that before you can successfully run 
+this command.
+
+```bash
+./build.sh --from-local-dist --archive ~/home/amusarra/apache-karaf-4.2.9.tar.gz
 ```
 
-If you want to build the container for a specific version of Karaf
-you can configure it with the `KARAF_VERSION` arg:
+You can also specify the image name with the flag `--image-name`, for example

Review comment:
       ```suggestion
   You can also specify the image name with the `--image-name` flag, for example
   ```




----------------------------------------------------------------
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