Skip to content

Commit

Permalink
Merge pull request #1679 from simonpahl/new-base-image
Browse files Browse the repository at this point in the history
Switch from AdoptOpenJDK to successor Eclipse Temurin
  • Loading branch information
jbonofre committed Nov 6, 2022
2 parents 4e1c526 + 5bc85ee commit 1051919
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion assemblies/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.
################################################################################

FROM adoptopenjdk:11-jre-hotspot
FROM eclipse-temurin:11-jre

# Karaf environment variables
ENV KARAF_INSTALL_PATH /opt
Expand Down
20 changes: 10 additions & 10 deletions assemblies/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ 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
Images are based on the Docker official [Eclipse Temurin 11 JRE](https://hub.docker.com/_/eclipse-temurin/tags?page=1&name=11-jre) image. If you want to
build the Karaf image you have the following choices:

1. Create the docker image from a local distribution package
Expand All @@ -50,21 +50,21 @@ Usage:

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).
The supported platforms (OS/Arch) depend on the build's base image, in this case [eclipse-temurin:11-jre](https://hub.docker.com/_/eclipse-temurin).
```
To create the docker image from local distribution) you can execute the command
below. Remember that before you can successfully run this command, you must build
the project (for example with the command `mvn clean install -DskipTests`).
For more info you can read:
To create the docker image from local distribution) you can execute the command
below. Remember that before you can successfully run this command, you must build
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
```
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
you can execute the below command. Remember that before you can successfully run
this command.
```bash
Expand All @@ -79,7 +79,7 @@ You can also specify the image name with the `--image-name` flag, for example
```
If you want to build the docker image for a specific version of Karaf
you can run `build.sh` command in this way (replacing the version, image name,
you can run `build.sh` command in this way (replacing the version, image name,
and targets as appropriate):
```bash
Expand Down Expand Up @@ -143,7 +143,7 @@ Starting build of the docker image for the platform linux/arm64,linux/arm/v7,lin
docker-compose run karaf karaf
```
or
or
```
docker run --name karaf karaf karaf
Expand All @@ -155,7 +155,7 @@ docker run --name karaf karaf karaf
docker-compose up
```
or
or
```
docker run --name karaf
Expand Down
8 changes: 4 additions & 4 deletions assemblies/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Usage:
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).
The supported platforms (OS/Arch) depend on the build's base image, in this case [eclipse-temurin:11-jre](https://hub.docker.com/_/eclipse-temurin).
HERE
exit 1
}
Expand Down Expand Up @@ -99,7 +99,7 @@ elif [ -n "${FROM_LOCAL}" ]; then

if [ -n "${ARCHIVE}" ]; then
DIST_DIR=${ARCHIVE}
else
else
DIST_DIR="../apache-karaf/target/apache-karaf-*.tar.gz"
fi
KARAF_DIST=${TMPDIR}/apache-karaf.tar.gz
Expand All @@ -119,7 +119,7 @@ if [ -n "${BUILD_MULTI_PLATFORM}" ]; then
if [ $? -eq 0 ]; then
echo "Found buildx {${VERSION_BUILD_X}} on your docker system"
echo "Starting build of the docker image for the platform ${BUILD_MULTI_PLATFORM}"

BUILD_X="buildx"
BUILD_X_FLAG="--push"
BUILD_X_PLATFORM="--platform ${BUILD_MULTI_PLATFORM}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
File dockerFile = new File(destDir, "Dockerfile");
try {
StringBuilder buffer = new StringBuilder();
buffer.append("FROM adoptopenjdk:11-jre-hotspot").append("\n");
buffer.append("FROM eclipse-temurin:11-jre").append("\n");
buffer.append("ENV KARAF_INSTALL_PATH /opt").append("\n");
buffer.append("ENV KARAF_HOME $KARAF_INSTALL_PATH/apache-karaf").append("\n");
buffer.append("ENV KARAF_EXEC exec").append("\n");
Expand Down

0 comments on commit 1051919

Please sign in to comment.