diff --git a/CHANGELOG.md b/CHANGELOG.md index a3fef93a..3ed911e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ in each resource release, will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [v5.11.0.9] - 2022-01-20 + +### Changed +- Remove redundant jdk11 docker image directory. + ## [v5.11.0.8] - 2021-12-13 ### Changed diff --git a/dockerfiles/jdk11/alpine/is/Dockerfile b/dockerfiles/jdk11/alpine/is/Dockerfile deleted file mode 100755 index 5b8ddd5a..00000000 --- a/dockerfiles/jdk11/alpine/is/Dockerfile +++ /dev/null @@ -1,143 +0,0 @@ -# ------------------------------------------------------------------------ -# -# Copyright 2018 WSO2, Inc. (http://wso2.com) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License -# -# ------------------------------------------------------------------------ - -# set base Docker image to AdoptOpenJDK Alpine Docker image -FROM alpine:3.15.0 - -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' JAVA_VERSION=jdk11u JAVA_HOME=/opt/java/openjdk \ - PATH="/opt/java/openjdk/bin:$PATH" ENV=${USER_HOME}"/.ashrc" - -RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ - && GLIBC_VER="2.33-r0" \ - && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ - && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ - && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ - && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ - && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ - && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ - && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ - && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ - && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ - && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ - && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ - && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ - && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ - && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ - && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ - && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ - && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ - && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ - && mkdir /tmp/gcc \ - && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ - && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ - && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ - && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ - && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ - && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ - && mkdir /tmp/libz \ - && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ - && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ - && apk del --purge .build-deps glibc-i18n \ - && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* - -RUN set -eux; \ - apk add --no-cache --virtual .fetch-deps curl; \ - ARCH="$(apk --print-arch)"; \ - case "${ARCH}" in \ - amd64|x86_64) \ - ESUM='2219cf4ec181453d7ce07b91b295f78c71933bc8b01c5ba9f2fbe74bc2b978f4'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2021-05-07-07-34/OpenJDK11U-jdk_x64_linux_hotspot_2021-05-07-07-34.tar.gz'; \ - ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ - esac; \ - curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ - echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ - mkdir -p /opt/java/openjdk; \ - cd /opt/java/openjdk; \ - tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ - apk del --purge .fetch-deps; \ - rm -rf /var/cache/apk/*; \ - rm -rf /tmp/openjdk.tar.gz; - -LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.5" - -# set Docker image build arguments -# build arguments for user/group configurations -ARG USER=wso2carbon -ARG USER_ID=802 -ARG USER_GROUP=wso2 -ARG USER_GROUP_ID=802 -ARG USER_HOME=/home/${USER} -# build arguments for WSO2 product installation -ARG WSO2_SERVER_NAME=wso2is -ARG WSO2_SERVER_VERSION=5.11.0 -ARG WSO2_SERVER_REPOSITORY=product-is -ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} -ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} -ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_VERSION}/${WSO2_SERVER}.zip -# build arguments for external artifacts -ARG DNS_JAVA_VERSION=2.1.8 -ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.8 -# build argument for MOTD -ARG MOTD='printf "\n\ - Welcome to WSO2 Docker Resources \n\ - --------------------------------- \n\ - This Docker container comprises of a WSO2 product, running with its latest GA release \n\ - which is under the Apache License, Version 2.0. \n\ - Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' - -# create the non-root user and group and set MOTD login message -RUN \ - addgroup -S -g ${USER_GROUP_ID} ${USER_GROUP} \ - && adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} \ - && echo ${MOTD} > "${ENV}" - -# copy init script to user home -COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ - -# install required packages -RUN apk add --no-cache netcat-openbsd - -# add the WSO2 product distribution to user's home directory -RUN \ - wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ - && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ - && rm -f ${WSO2_SERVER}.zip - -# add libraries for Kubernetes membership scheme based clustering -ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib -ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins - -# set the user and work directory -USER ${USER_ID} -WORKDIR ${USER_HOME} - -# set environment variables -ENV WORKING_DIRECTORY=${USER_HOME} \ - WSO2_SERVER_HOME=${WSO2_SERVER_HOME} - -# expose ports -EXPOSE 4000 9763 9443 - -# initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/jdk11/alpine/is/README.md b/dockerfiles/jdk11/alpine/is/README.md deleted file mode 100755 index ec57490b..00000000 --- a/dockerfiles/jdk11/alpine/is/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# Dockerfile for WSO2 Identity Server # - -This section defines the step-by-step instructions to build an [Alpine](https://hub.docker.com/_/alpine/) Linux based Docker image for WSO2 Identity Server `5.11.0`. - -## Prerequisites - -* [Docker](https://www.docker.com/get-docker) `v17.09.0` or above -* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client - -## How to build an image and run - -##### 1. Checkout this repository into your local machine using the following Git client command. - -``` -git clone https://github.com/wso2/docker-is.git -``` - ->The local copy of the `dockerfiles/alpine/is` directory will be referred to as `IS_DOCKERFILE_HOME` from this point onwards. - -##### 2. Build the Docker image. - -- Navigate to `` directory.
- Execute `docker build` command as shown below. - + `docker build -t wso2is:5.11.0-alpine .` - -> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. - -> Tip - If you require the container to run with a different UID and GID, pass the preferred values of the UID and GID -> as values for build arguments `USER_ID` and `USER_GROUP_ID` when building the image, as shown below. Note -> that setting lower values for the UID and GID is not recommended. -+ `docker build -t wso2is:5.11.0-alpine --build-arg USER_ID= --build-arg USER_GROUP_ID= .` - -##### 3. Running the Docker image. - -- `docker run -it -p 9443:9443 wso2is:5.11.0-alpine` - ->Here, only port 9443 (HTTPS servlet transport) has been mapped to a Docker host port. -You may map other container service ports, which have been exposed to Docker host ports, as desired. - -##### 4. Accessing management consoles. - -- To access the user interfaces, use the docker host IP and port 9443. - + Management Console: `https://:9443/console` - + User Portal: `https://:9443/myaccount` - ->In here, refers to hostname or IP of the host machine on top of which containers are spawned. - -## How to update configurations - -Configurations would lie on the Docker host machine and they can be volume mounted to the container.
-As an example, steps required to change the port offset using `deployment.toml` is as follows: - -##### 1. Stop the Identity Server container if it's already running. - -In WSO2 Identity Server version `5.11.0` product distribution, `deployment.toml` configuration file
-can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
-referred to as `/deployment.toml` and change the `[server] -> offset` value to 1. - -##### 2. Grant read permission to `other` users for `/deployment.toml`. - -``` -chmod o+r /deployment.toml -``` - -##### 3. Run the image by mounting the file to container as follows: - -``` -docker run \ --p 9444:9444 \ ---volume /deployment.toml:/deployment.toml \ -wso2is:5.11.0-alpine -``` - ->In here, refers to /home/wso2carbon/wso2is-5.11.0/repository/conf folder of the container. - -## Docker command usage references - -* [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) -* [Docker run command reference](https://docs.docker.com/engine/reference/run/) -* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) diff --git a/dockerfiles/jdk11/alpine/is/docker-entrypoint.sh b/dockerfiles/jdk11/alpine/is/docker-entrypoint.sh deleted file mode 100755 index a9665a40..00000000 --- a/dockerfiles/jdk11/alpine/is/docker-entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (http://wso2.com) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License -# ------------------------------------------------------------------------ - -set -e - -# volume mounts -config_volume=${WORKING_DIRECTORY}/wso2-config-volume -artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume - -# check if the WSO2 non-root user home exists -test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 - -# check if the WSO2 product home exists -test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 - -# copy any configuration changes mounted to config_volume -test -d ${config_volume} && [ "$(ls -A ${config_volume})" ] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ -# copy any artifact changes mounted to artifact_volume -test -d ${artifact_volume} && [ "$(ls -A ${artifact_volume})" ] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ - -# start WSO2 Carbon server -sh ${WSO2_SERVER_HOME}/bin/wso2server.sh "$@" diff --git a/dockerfiles/jdk11/centos/is/Dockerfile b/dockerfiles/jdk11/centos/is/Dockerfile deleted file mode 100755 index 840c5ef3..00000000 --- a/dockerfiles/jdk11/centos/is/Dockerfile +++ /dev/null @@ -1,90 +0,0 @@ -# ------------------------------------------------------------------------ -# -# Copyright 2018 WSO2, Inc. (http://wso2.com) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License -# -# ------------------------------------------------------------------------ - -# set base Docker image to AdoptOpenJDK CentOS Docker image -FROM adoptopenjdk/openjdk11:x86_64-centos-jdk-11.0.11_9 -LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.8" - -# set Docker image build arguments -# build arguments for user/group configurations -ARG USER=wso2carbon -ARG USER_ID=802 -ARG USER_GROUP=wso2 -ARG USER_GROUP_ID=802 -ARG USER_HOME=/home/${USER} -# build arguments for WSO2 product installation -ARG WSO2_SERVER_NAME=wso2is -ARG WSO2_SERVER_VERSION=5.11.0 -ARG WSO2_SERVER_REPOSITORY=product-is -ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} -ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} -ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_VERSION}/${WSO2_SERVER}.zip -# build arguments for external artifacts -ARG DNS_JAVA_VERSION=2.1.8 -ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.8 -# build argument for MOTD -ARG MOTD='printf "\n\ -Welcome to WSO2 Docker resources.\n\ ------------------------------------- \n\ -This Docker container comprises of a WSO2 product, running with its latest GA release \n\ -which is under the Apache License, Version 2.0. \n\ -Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' - -# create the non-root user and group and set MOTD login message -RUN \ - groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ - && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ - && echo ${MOTD} > /etc/profile.d/motd.sh - -# copy init script to user home -COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ - -# install required packages -RUN \ - yum -y update \ - && yum install -y \ - nc \ - unzip \ - wget \ - && rm -rf /var/cache/yum/* - -# add the WSO2 product distribution to user's home directory -RUN \ - wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ - && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ - && rm -f ${WSO2_SERVER}.zip - -# add libraries for Kubernetes membership scheme based clustering -ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib -ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins - -# set the user and work directory -USER ${USER_ID} -WORKDIR ${USER_HOME} - -# set environment variables -ENV WORKING_DIRECTORY=${USER_HOME} \ - WSO2_SERVER_HOME=${WSO2_SERVER_HOME} - -# expose ports -EXPOSE 4000 9763 9443 - -# initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/jdk11/centos/is/README.md b/dockerfiles/jdk11/centos/is/README.md deleted file mode 100755 index f71078d7..00000000 --- a/dockerfiles/jdk11/centos/is/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# Dockerfile for WSO2 Identity Server # - -This section defines the step-by-step instructions to build an [CentOS](https://hub.docker.com/_/centos/) Linux based Docker image for WSO2 Identity Server `5.11.0`. - -## Prerequisites - -* [Docker](https://www.docker.com/get-docker) `v17.09.0` or above -* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client - -## How to build an image and run - -##### 1. Checkout this repository into your local machine using the following Git client command. - -``` -git clone https://github.com/wso2/docker-is.git -``` - ->The local copy of the `dockerfiles/centos/is` directory will be referred to as `IS_DOCKERFILE_HOME` from this point onwards. - -##### 2. Build the Docker image. - -- Navigate to `` directory.
- Execute `docker build` command as shown below. - + `docker build -t wso2is:5.11.0-centos .` - -> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. - -> Tip - If you require the container to run with a different UID and GID, pass the preferred values of the UID and GID -> as values for build arguments `USER_ID` and `USER_GROUP_ID` when building the image, as shown below. Note -> that setting lower values for the UID and GID is not recommended. -+ `docker build -t wso2is:5.11.0-centos --build-arg USER_ID= --build-arg USER_GROUP_ID= .` - -##### 3. Running the Docker image. - -- `docker run -it -p 9443:9443 wso2is:5.11.0-centos` - ->Here, only port 9443 (HTTPS servlet transport) has been mapped to a Docker host port. -You may map other container service ports, which have been exposed to Docker host ports, as desired. - -##### 4. Accessing management consoles. - -- To access the user interfaces, use the docker host IP and port 9443. - + Management Console: `https://:9443/console` - + User Portal: `https://:9443/myaccount` - ->In here, refers to hostname or IP of the host machine on top of which containers are spawned. - -## How to update configurations - -Configurations would lie on the Docker host machine and they can be volume mounted to the container.
-As an example, steps required to change the port offset using `deployment.toml` is as follows: - -##### 1. Stop the Identity Server container if it's already running. - -In WSO2 Identity Server version `5.11.0` product distribution, `deployment.toml` configuration file
-can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
-referred to as `/deployment.toml` and change the `[server] -> offset` value to 1. - -##### 2. Grant read permission to `other` users for `/deployment.toml`. - -``` -chmod o+r /deployment.toml -``` - -##### 3. Run the image by mounting the file to container as follows: - -``` -docker run \ --p 9444:9444 \ ---volume /deployment.toml:/deployment.toml \ -wso2is:5.11.0-centos -``` - ->In here, refers to /home/wso2carbon/wso2is-5.11.0/repository/conf folder of the container. - -## Docker command usage references - -* [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) -* [Docker run command reference](https://docs.docker.com/engine/reference/run/) -* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) diff --git a/dockerfiles/jdk11/centos/is/docker-entrypoint.sh b/dockerfiles/jdk11/centos/is/docker-entrypoint.sh deleted file mode 100755 index a9665a40..00000000 --- a/dockerfiles/jdk11/centos/is/docker-entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (http://wso2.com) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License -# ------------------------------------------------------------------------ - -set -e - -# volume mounts -config_volume=${WORKING_DIRECTORY}/wso2-config-volume -artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume - -# check if the WSO2 non-root user home exists -test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 - -# check if the WSO2 product home exists -test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 - -# copy any configuration changes mounted to config_volume -test -d ${config_volume} && [ "$(ls -A ${config_volume})" ] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ -# copy any artifact changes mounted to artifact_volume -test -d ${artifact_volume} && [ "$(ls -A ${artifact_volume})" ] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ - -# start WSO2 Carbon server -sh ${WSO2_SERVER_HOME}/bin/wso2server.sh "$@" diff --git a/dockerfiles/jdk11/ubuntu/is/Dockerfile b/dockerfiles/jdk11/ubuntu/is/Dockerfile deleted file mode 100755 index 351448d9..00000000 --- a/dockerfiles/jdk11/ubuntu/is/Dockerfile +++ /dev/null @@ -1,90 +0,0 @@ -# ------------------------------------------------------------------------ -# -# Copyright 2017 WSO2, Inc. (http://wso2.com) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License -# -# ------------------------------------------------------------------------ - -# set base Docker image to AdoptOpenJDK Ubuntu Docker image -FROM adoptopenjdk:11.0.11_9-jdk-hotspot-focal -LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.8" - -# set Docker image build arguments -# build arguments for user/group configurations -ARG USER=wso2carbon -ARG USER_ID=802 -ARG USER_GROUP=wso2 -ARG USER_GROUP_ID=802 -ARG USER_HOME=/home/${USER} -# build arguments for WSO2 product installation -ARG WSO2_SERVER_NAME=wso2is -ARG WSO2_SERVER_VERSION=5.11.0 -ARG WSO2_SERVER_REPOSITORY=product-is -ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} -ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} -ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_VERSION}/${WSO2_SERVER}.zip -# build arguments for external artifacts -ARG DNS_JAVA_VERSION=2.1.8 -ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.8 -# build argument for MOTD -ARG MOTD="\n\ -Welcome to WSO2 Docker resources.\n\ ------------------------------------- \n\ -This Docker container comprises of a WSO2 product, running with its latest GA release \n\ -which is under the Apache License, Version 2.0. \n\ -Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n" - -# create the non-root user and group and set MOTD login message -RUN \ - groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ - && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ - && echo '[ ! -z "${TERM}" -a -r /etc/motd ] && cat /etc/motd' >> /etc/bash.bashrc; echo "${MOTD}" > /etc/motd - -# copy init script to user home -COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ - -# install required packages -RUN \ - apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - netcat \ - unzip \ - wget \ - && rm -rf /var/lib/apt/lists/* - -# add the WSO2 product distribution to user's home directory -RUN \ - wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ - && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ - && rm -f ${WSO2_SERVER}.zip - -# add libraries for Kubernetes membership scheme based clustering -ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib -ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins - -# set the user and work directory -USER ${USER_ID} -WORKDIR ${USER_HOME} - -# set environment variables -ENV WORKING_DIRECTORY=${USER_HOME} \ - WSO2_SERVER_HOME=${WSO2_SERVER_HOME} - -# expose ports -EXPOSE 4000 9763 9443 - -# initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/jdk11/ubuntu/is/README.md b/dockerfiles/jdk11/ubuntu/is/README.md deleted file mode 100755 index 40ad53ce..00000000 --- a/dockerfiles/jdk11/ubuntu/is/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# Dockerfile for WSO2 Identity Server # - -This section defines the step-by-step instructions to build an [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for WSO2 Identity Server `5.11.0`. - -## Prerequisites - -* [Docker](https://www.docker.com/get-docker) `v17.09.0` or above -* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client - -## How to build an image and run - -##### 1. Checkout this repository into your local machine using the following Git client command. - -``` -git clone https://github.com/wso2/docker-is.git -``` - ->The local copy of the `dockerfiles/ubuntu/is` directory will be referred to as `IS_DOCKERFILE_HOME` from this point onwards. - -##### 2. Build the Docker image. - -- Navigate to `` directory.
- Execute `docker build` command as shown below. - + `docker build -t wso2is:5.11.0 .` - -> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. - -> Tip - If you require the container to run with a different UID and GID, pass the preferred values of the UID and GID -> as values for build arguments `USER_ID` and `USER_GROUP_ID` when building the image, as shown below. Note -> that setting lower values for the UID and GID is not recommended. -+ `docker build -t wso2is:5.11.0 --build-arg USER_ID= --build-arg USER_GROUP_ID= .` - -##### 3. Running the Docker image. - -- `docker run -it -p 9443:9443 wso2is:5.11.0` - ->Here, only port 9443 (HTTPS servlet transport) has been mapped to a Docker host port. -You may map other container service ports, which have been exposed to Docker host ports, as desired. - -##### 4. Accessing management consoles. - -- To access the user interfaces, use the docker host IP and port 9443. - + Management Console: `https://:9443/console` - + User Portal: `https://:9443/myaccount` - ->In here, refers to hostname or IP of the host machine on top of which containers are spawned. - -## How to update configurations - -Configurations would lie on the Docker host machine and they can be volume mounted to the container.
-As an example, steps required to change the port offset using `deployment.toml` is as follows: - -##### 1. Stop the Identity Server container if it's already running. - -In WSO2 Identity Server version `5.11.0` product distribution, `deployment.toml` configuration file
-can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
-referred to as `/deployment.toml` and change the `[server] -> offset` value to 1. - -##### 2. Grant read permission to `other` users for `/deployment.toml`. - -``` -chmod o+r /deployment.toml -``` - -##### 3. Run the image by mounting the file to container as follows: - -``` -docker run \ --p 9444:9444 \ ---volume /deployment.toml:/deployment.toml \ -wso2is:5.11.0 -``` - ->In here, refers to /home/wso2carbon/wso2is-5.11.0/repository/conf folder of the container. - -## Docker command usage references - -* [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) -* [Docker run command reference](https://docs.docker.com/engine/reference/run/) -* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) diff --git a/dockerfiles/jdk11/ubuntu/is/docker-entrypoint.sh b/dockerfiles/jdk11/ubuntu/is/docker-entrypoint.sh deleted file mode 100755 index a9665a40..00000000 --- a/dockerfiles/jdk11/ubuntu/is/docker-entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (http://wso2.com) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License -# ------------------------------------------------------------------------ - -set -e - -# volume mounts -config_volume=${WORKING_DIRECTORY}/wso2-config-volume -artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume - -# check if the WSO2 non-root user home exists -test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 - -# check if the WSO2 product home exists -test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 - -# copy any configuration changes mounted to config_volume -test -d ${config_volume} && [ "$(ls -A ${config_volume})" ] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ -# copy any artifact changes mounted to artifact_volume -test -d ${artifact_volume} && [ "$(ls -A ${artifact_volume})" ] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ - -# start WSO2 Carbon server -sh ${WSO2_SERVER_HOME}/bin/wso2server.sh "$@"