You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/09/09 04:38:06 UTC

[skywalking] branch master updated: Merge `Dockerfile`s in apache/skywalking-docker into this codebase (#7681)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new f61dff9  Merge `Dockerfile`s in apache/skywalking-docker into this codebase (#7681)
f61dff9 is described below

commit f61dff9a9f1d1f8ddd11c31f039e540521479d36
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Sep 9 12:37:50 2021 +0800

    Merge `Dockerfile`s in apache/skywalking-docker into this codebase (#7681)
---
 .github/workflows/e2e.jdk-versions.yaml            |   2 +-
 CHANGES.md                                         |   1 +
 Makefile                                           |  24 +++--
 .../apm/util/PropertyPlaceholderHelper.java        |  11 +--
 docker/.env                                        |   4 +-
 docker/README.md                                   |  44 +++++++--
 docker/docker-compose.yml                          |  50 ++++++----
 docker/oap/Dockerfile.oap                          | 109 ++++++++++++++++++---
 docker/oap/log4j2.xml                              |  10 --
 docker/ui/Dockerfile.ui                            |  25 ++---
 docs/en/guides/How-to-release.md                   |  18 +++-
 docs/en/setup/backend/docker.md                    |  25 +++++
 docs/en/setup/backend/ui-setup.md                  |  15 +++
 docs/menu.yml                                      |   2 +
 .../library/elasticsearch/ElasticSearch.java       |   1 +
 test/e2e/e2e-test/docker/base-compose.yml          |   1 +
 .../oap => test/e2e/e2e-test/docker}/log4j2.xml    |   0
 17 files changed, 252 insertions(+), 90 deletions(-)

diff --git a/.github/workflows/e2e.jdk-versions.yaml b/.github/workflows/e2e.jdk-versions.yaml
index 427f2d1..b9e96cc 100644
--- a/.github/workflows/e2e.jdk-versions.yaml
+++ b/.github/workflows/e2e.jdk-versions.yaml
@@ -33,7 +33,7 @@ jobs:
     timeout-minutes: 90
     strategy:
       matrix:
-        jdk: [ 8, 9, 10, 11, 12, 13, 14, 15 ]
+        jdk: [ 8, 11, 12, 13, 14, 15 ]
     env:
       SW_SIMPLE_CASE: jdk
       SW_AGENT_JDK_VERSION: ${{ matrix.jdk }}
diff --git a/CHANGES.md b/CHANGES.md
index 540ac79..dea6d27 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -8,6 +8,7 @@ Release Notes.
 #### Project
 
 * Split javaagent into skywalking-java repository. https://github.com/apache/skywalking-java
+* Merge `Dockerfile`s from apache/skywalking-docker into this codebase. 
 
 #### OAP Server
 
diff --git a/Makefile b/Makefile
index 51f13ca..793d71d 100644
--- a/Makefile
+++ b/Makefile
@@ -16,12 +16,11 @@
 
 SHELL := /bin/bash -o pipefail
 
-export SW_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
-
-export SW_OUT:=${SW_ROOT}/dist
-
-SKIP_TEST?=false
-DIST_NAME := apache-skywalking-apm-bin
+SW_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+CONTEXT ?= ${SW_ROOT}/dist
+SKIP_TEST ?= false
+DIST ?= apache-skywalking-apm-bin.tar.gz
+CLI_VERSION ?= 0.7.0 # CLI version inside OAP image should always use an Apache released artifact.
 
 init:
 	cd $(SW_ROOT) && git submodule update --init --recursive
@@ -37,11 +36,10 @@ build.backend:
 build.ui:
 	cd $(SW_ROOT) && ./mvnw --batch-mode clean package -Dmaven.test.skip=$(SKIP_TEST) -Pui,dist
 
-DOCKER_BUILD_TOP:=${SW_OUT}/docker_build
-
-HUB?=skywalking
+DOCKER_BUILD_TOP:=${CONTEXT}/docker_build
 
-TAG?=latest
+HUB ?= skywalking
+TAG ?= latest
 
 .SECONDEXPANSION: #allow $@ to be used in dependency list
 
@@ -57,15 +55,15 @@ ifneq ($(SW_OAP_BASE_IMAGE),)
   BUILD_ARGS := $(BUILD_ARGS) --build-arg BASE_IMAGE=$(SW_OAP_BASE_IMAGE)
 endif
 
-BUILD_ARGS := $(BUILD_ARGS) --build-arg DIST_NAME=$(DIST_NAME)
+BUILD_ARGS := $(BUILD_ARGS) --build-arg DIST=$(DIST) --build-arg SKYWALKING_CLI_VERSION=$(CLI_VERSION)
 
-docker.oap: $(SW_OUT)/$(DIST_NAME).tar.gz
+docker.oap: $(CONTEXT)/$(DIST)
 docker.oap: $(SW_ROOT)/docker/oap/Dockerfile.oap
 docker.oap: $(SW_ROOT)/docker/oap/docker-entrypoint.sh
 docker.oap: $(SW_ROOT)/docker/oap/log4j2.xml
 		$(DOCKER_RULE)
 
-docker.ui: $(SW_OUT)/apache-skywalking-apm-bin.tar.gz
+docker.ui: $(CONTEXT)/$(DIST)
 docker.ui: $(SW_ROOT)/docker/ui/Dockerfile.ui
 docker.ui: $(SW_ROOT)/docker/ui/docker-entrypoint.sh
 docker.ui: $(SW_ROOT)/docker/ui/logback.xml
diff --git a/apm-commons/apm-util/src/main/java/org/apache/skywalking/apm/util/PropertyPlaceholderHelper.java b/apm-commons/apm-util/src/main/java/org/apache/skywalking/apm/util/PropertyPlaceholderHelper.java
index c12661c..50c4a8e 100644
--- a/apm-commons/apm-util/src/main/java/org/apache/skywalking/apm/util/PropertyPlaceholderHelper.java
+++ b/apm-commons/apm-util/src/main/java/org/apache/skywalking/apm/util/PropertyPlaceholderHelper.java
@@ -63,7 +63,7 @@ public enum PropertyPlaceholderHelper {
             throw new UnsupportedOperationException("'placeholderPrefix or placeholderSuffix' must not be null");
         }
 
-        final Map<String, String> wellKnownSimplePrefixes = new HashMap<String, String>(4);
+        final Map<String, String> wellKnownSimplePrefixes = new HashMap<>(4);
 
         wellKnownSimplePrefixes.put("}", "{");
         wellKnownSimplePrefixes.put("]", "[");
@@ -90,12 +90,9 @@ public enum PropertyPlaceholderHelper {
      * @return the supplied value with placeholders replaced inline
      */
     public String replacePlaceholders(String value, final Properties properties) {
-        return replacePlaceholders(value, new PlaceholderResolver() {
-            @Override
-            public String resolvePlaceholder(String placeholderName) {
-                return getConfigValue(placeholderName, properties);
-            }
-        });
+        return replacePlaceholders(value,
+                                   placeholderName -> getConfigValue(placeholderName, properties)
+        );
     }
 
     private String getConfigValue(String key, final Properties properties) {
diff --git a/docker/.env b/docker/.env
index 78afd2c..e3acece 100644
--- a/docker/.env
+++ b/docker/.env
@@ -1 +1,3 @@
-ES_TAG=7.4.2
+ES_VERSION=7.4.2
+OAP_IMAGE=skywalking/oap:latest
+UI_IMAGE=skywalking/ui:latest
diff --git a/docker/README.md b/docker/README.md
index 15efb19..640dec4 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -1,39 +1,63 @@
-This folder contains Docker files for SkyWalking developers/committers to build images manually. If you want to start a SkyWalking backend server with docker-compose for your integration, please visit https://github.com/apache/skywalking-docker repository. 
+# Docker Images
 
+This folder contains Dockerfiles that are used to **build**
+our [OAP Docker images](https://hub.docker.com/r/apache/skywalking-oap-server)
+and [UI Docker image](https://hub.docker.com/r/apache/skywalking-ui). If you want to use the Docker images, please
+check [the user guide for OAP](../docs/en/setup/backend/docker.md)
+and [the user guide for UI](../docs/en/setup/backend/ui-setup.md#start-with-docker-image).
 
 ## Quickstart
+
 You can use `Makefile` located at the root folder to build a docker image with the current codebase.
 
-```
+```shell
 make docker
 ```
 
-It doesn't contain the process of building a docker image but also includes all the required steps, for instance, init workspace, build artifact from scratch. It builds two images, OAP, and UI.
+It not only contains the process of building a docker image but also includes all the required steps, for instance, init
+workspace, build artifact from scratch. It builds two images, OAP, and UI.
 
-```
+```shell
 docker image ls | grep skywalking
 skywalking/ui                                   latest              a14db4e1d70d        6 minutes ago       800MB
 skywalking/oap                                  latest              2a6084450b44        6 minutes ago       862MB
 ```
 
-
 ## Building variables
 
-There're some environment variables to control image building.
+There are some environment variables to control image building.
+
+### `CONTEXT`
+
+The Docker build context path, under this path, there should be the distribution tar ball.
+
+```shell
+ls $CONTEXT
+apache-skywalking-apm-bin.tar.gz
+```
+
+### `DIST`
+
+The distribution tar ball name, for example, `apache-skywalking-apm-bin.tar.gz`.
+
+### `CLI_VERSION`
 
-### HUB
+The [SkyWalking CLI](http://github.com/apache/skywalking-cli) version to be included in the OAP image, it must be an
+official Apache release version.
+
+### `HUB`
 
 The hub of docker image. The default value is `skywalking`.
 
-### TAG
+### `TAG`
 
 The tag of docker image. The default value is `latest`.
 
 ## Running containers with docker-compose
 
 We can start up backend cluster by docker-compose
-```
-cd docker
+
+```shell
 docker compose up
 ```
 
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 37c0dee..55d2955 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -14,51 +14,61 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-version: '3.5'
+version: '3.8'
 services:
   elasticsearch:
-    image: docker.elastic.co/elasticsearch/elasticsearch:${ES_TAG}
+    image: docker.elastic.co/elasticsearch/elasticsearch-oss:${ES_VERSION}
     container_name: elasticsearch
-    restart: always
     ports:
-      - 9200:9200
+      - "9200:9200"
+    healthcheck:
+      test: [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1" ]
+      interval: 30s
+      timeout: 10s
+      retries: 3
+      start_period: 10s
     environment:
-      discovery.type: single-node
+      - discovery.type=single-node
+      - bootstrap.memory_lock=true
+      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
     ulimits:
       memlock:
         soft: -1
         hard: -1
+
   oap:
-    image: skywalking/oap
+    image: ${OAP_IMAGE}
     container_name: oap
     depends_on:
-      - elasticsearch
+      elasticsearch:
+        condition: service_healthy
     links:
       - elasticsearch
-    restart: always
     ports:
-      - 11800:11800
-      - 12800:12800
+      - "11800:11800"
+      - "12800:12800"
+    healthcheck:
+      test: [ "CMD-SHELL", "/skywalking/bin/swctl ch" ]
+      interval: 30s
+      timeout: 10s
+      retries: 3
+      start_period: 10s
     environment:
       SW_STORAGE: elasticsearch
       SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
       SW_HEALTH_CHECKER: default
       SW_TELEMETRY: prometheus
-    healthcheck:
-      test: ["CMD", "./bin/swctl", "ch"]
-      interval: 30s
-      timeout: 10s
-      retries: 3
-      start_period: 40s
+      JAVA_OPTS: "-Xms2048m -Xmx2048m"
+
   ui:
-    image: skywalking/ui
+    image: ${UI_IMAGE}
     container_name: ui
     depends_on:
-      - oap
+      oap:
+        condition: service_healthy
     links:
       - oap
-    restart: always
     ports:
-      - 8080:8080
+      - "8080:8080"
     environment:
       SW_OAP_ADDRESS: http://oap:12800
diff --git a/docker/oap/Dockerfile.oap b/docker/oap/Dockerfile.oap
index ba36df5..b53e10e 100644
--- a/docker/oap/Dockerfile.oap
+++ b/docker/oap/Dockerfile.oap
@@ -14,36 +14,113 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE='adoptopenjdk/openjdk11:alpine-jre'
+ARG BASE_IMAGE='adoptopenjdk/openjdk11:alpine'
 
-FROM apache/skywalking-base:8.7.0-es7 AS cli
+FROM $BASE_IMAGE as cli
+
+WORKDIR /skywalking
+
+ARG SKYWALKING_CLI_VERSION=0.7.0
+ENV SKYWALKING_CLI_TGZ=skywalking-cli-$SKYWALKING_CLI_VERSION-bin.tgz
+ENV SKYWALKING_CLI_ASC=${SKYWALKING_CLI_TGZ}.asc
+ENV SKYWALKING_CLI_SHA512=${SKYWALKING_CLI_TGZ}.sha512
+
+ENV SKYWALKING_CLI_TGZ_URLS \
+        https://www.apache.org/dyn/closer.cgi?action=download&filename=skywalking/cli/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_TGZ \
+        # if the version is outdated, we might have to pull from the dist/archive :/
+	    https://www-us.apache.org/dist/skywalking/cli/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_TGZ \
+	    https://www.apache.org/dist/skywalking/cli/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_TGZ \
+	    https://archive.apache.org/dist/skywalking/cli/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_TGZ
+
+ENV SKYWALKING_CLI_ASC_URLS \
+        https://www.apache.org/dyn/closer.cgi?action=download&filename=skywalking/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_ASC \
+        # if the version is outdated, we might have to pull from the dist/archive :/
+	    https://www-us.apache.org/dist/skywalking/cli/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_ASC \
+	    https://www.apache.org/dist/skywalking/cli/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_ASC \
+	    https://archive.apache.org/dist/skywalking/cli/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_ASC
+
+ENV SKYWALKING_CLI_SHA512_URLS \
+        https://www.apache.org/dyn/closer.cgi?action=download&filename=skywalking/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_SHA512 \
+        # if the version is outdated, we might have to pull from the dist/archive :/
+	    https://www-us.apache.org/dist/skywalking/cli/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_SHA512 \
+	    https://www.apache.org/dist/skywalking/cli/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_SHA512 \
+	    https://archive.apache.org/dist/skywalking/cli/$SKYWALKING_CLI_VERSION/$SKYWALKING_CLI_SHA512
+
+
+RUN set -eux; \
+	\
+	apk add --no-cache --virtual .fetch-deps \
+		gnupg \
+		ca-certificates \
+		openssl \
+	; \
+	\
+	wget --timeout=20 -O KEYS https://downloads.apache.org/skywalking/KEYS; \
+	gpg --import KEYS; \
+	\
+	success=; \
+	for url in $SKYWALKING_CLI_TGZ_URLS; do \
+		if wget --timeout=20  -O ${SKYWALKING_CLI_TGZ} "$url"; then \
+			success=1; \
+			break; \
+		fi; \
+	done; \
+	[ -n "$success" ]; \
+	\
+	success=; \
+	for url in $SKYWALKING_CLI_SHA512_URLS; do \
+		if wget --timeout=20  -O ${SKYWALKING_CLI_SHA512} "$url"; then \
+			success=1; \
+			break; \
+		fi; \
+	done; \
+	[ -n "$success" ]; \
+	\
+	sha512sum -c ${SKYWALKING_CLI_SHA512}; \
+	\
+	success=; \
+	for url in $SKYWALKING_CLI_ASC_URLS; do \
+		if wget --timeout=20  -O ${SKYWALKING_CLI_ASC} "$url"; then \
+			success=1; \
+			break; \
+		fi; \
+	done; \
+	[ -n "$success" ]; \
+	\
+	gpg --batch --verify ${SKYWALKING_CLI_ASC} ${SKYWALKING_CLI_TGZ}; \
+	tar -xvf ${SKYWALKING_CLI_TGZ}; \
+    mkdir "bin/"; \
+	mv skywalking-cli-${SKYWALKING_CLI_VERSION}-bin/bin/swctl-${SKYWALKING_CLI_VERSION}-linux-amd64 bin/swctl; \
+	chmod 755 bin/*; \
+	command -v gpgconf && gpgconf --kill all || :; \
+	ls -la .;
 
 FROM $BASE_IMAGE
 
-RUN apk add --no-cache openssl || true
+RUN apk add --no-cache openssl
 
-ENV JAVA_OPTS=" -Xms256M " \
-    SW_CLUSTER="standalone" \
-    SW_STORAGE="h2"
+WORKDIR /skywalking
 
-ARG DIST_NAME
+ENV JAVA_OPTS=" -Xms2G "
 
-COPY "$DIST_NAME.tar.gz" /
+ARG DIST
 
-RUN set -ex; \
-    tar -xzf "$DIST_NAME.tar.gz"; \
-    rm -rf "$DIST_NAME.tar.gz"; \
-    rm -rf "$DIST_NAME/config/log4j2.xml"; \
-    rm -rf "$DIST_NAME/bin"; rm -rf "$DIST_NAME/webapp"; rm -rf "$DIST_NAME/agent"; \
-    mkdir "$DIST_NAME/bin"; \
-    mv "$DIST_NAME" skywalking;
+COPY "$DIST" .
 
-WORKDIR skywalking
+RUN set -ex; \
+    tar -xzf "$DIST" --strip 1; \
+    rm -rf "$DIST"; \
+    rm -rf "config/log4j2.xml"; \
+    rm -rf "bin"; \
+    rm -rf "webapp"; \
+    rm -rf "agent"; \
+    mkdir "bin";
 
 COPY --from=cli /skywalking/bin/swctl ./bin
 
 COPY log4j2.xml config/
 COPY docker-entrypoint.sh .
+
 RUN mkdir ext-config; \
     mkdir ext-libs;
 
diff --git a/docker/oap/log4j2.xml b/docker/oap/log4j2.xml
index 2758ba6..eab9c37 100644
--- a/docker/oap/log4j2.xml
+++ b/docker/oap/log4j2.xml
@@ -24,16 +24,6 @@
         </Console>
     </Appenders>
     <Loggers>
-        <logger name="org.eclipse.jetty" level="INFO"/>
-        <logger name="org.apache.zookeeper" level="INFO"/>
-        <logger name="io.grpc.netty" level="INFO"/>
-        <logger name="org.apache.skywalking.oap.meter.analyzer" level="DEBUG"/>
-        <logger name="org.apache.skywalking.oap.server.receiver.istio.telemetry" level="DEBUG"/>
-        <logger name="org.apache.skywalking.oap.server.fetcher.prometheus" level="DEBUG"/>
-        <logger name="org.apache.skywalking.oap.server.receiver.envoy.als" level="DEBUG"/>
-        <logger name="org.apache.skywalking.oap.server.storage.plugin.elasticsearch" level="DEBUG"/>
-        <logger name="org.apache.skywalking.oap.server.core.storage.ttl" level="DEBUG"/>
-        <logger name="org.apache.skywalking.library.elasticsearch" level="DEBUG"/>
         <Root level="INFO">
             <AppenderRef ref="Console"/>
         </Root>
diff --git a/docker/ui/Dockerfile.ui b/docker/ui/Dockerfile.ui
index 7a78061..760631c 100644
--- a/docker/ui/Dockerfile.ui
+++ b/docker/ui/Dockerfile.ui
@@ -16,25 +16,28 @@
 
 FROM adoptopenjdk/openjdk11:alpine-jre
 
-ENV DIST_NAME=apache-skywalking-apm-bin \
-    JAVA_OPTS=" -Xms256M " \
+ENV JAVA_OPTS=" -Xms256M " \
     SW_OAP_ADDRESS="http://127.0.0.1:12800"
 
-COPY "$DIST_NAME.tar.gz" /
+WORKDIR skywalking
 
 RUN set -ex; \
-    apk add bash; \
-    tar -xzf "$DIST_NAME.tar.gz"; \
-    rm -rf "$DIST_NAME.tar.gz"; \
-    rm -rf "$DIST_NAME/config"; \
-    rm -rf "$DIST_NAME/bin"; rm -rf "$DIST_NAME/oap-libs"; rm -rf "$DIST_NAME/agent"; \
-    mv "$DIST_NAME" skywalking;
+    apk add --no-cache \
+    bash
 
-WORKDIR skywalking
+ARG DIST
+COPY "$DIST" .
+
+RUN tar -xzf "$DIST" --strip 1; \
+    rm -rf "$DIST"; \
+    rm -rf "config"; \
+    rm -rf "bin"; \
+    rm -rf "oap-libs"; \
+    rm -rf "agent";
 
 COPY docker-entrypoint.sh .
 COPY logback.xml webapp/
 
 EXPOSE 8080
 
-ENTRYPOINT ["bash", "docker-entrypoint.sh"]
\ No newline at end of file
+ENTRYPOINT ["bash", "docker-entrypoint.sh"]
diff --git a/docs/en/guides/How-to-release.md b/docs/en/guides/How-to-release.md
index a6edadc..78db15a 100644
--- a/docs/en/guides/How-to-release.md
+++ b/docs/en/guides/How-to-release.md
@@ -92,7 +92,7 @@ if you haven't done it before.
     * Package name: `apache-skywalking-x.y.z-src.tar.gz`
     * See Section "Build and sign the source code package" for more details 
 1. Upload the distribution package to the folder with files ending with `.asc` and `.sha512`.
-    * Package name:  `apache-skywalking-bin-x.y.z.tar.gz` and `apache-skywalking-bin-x.y.z.zip`
+    * Package name:  `apache-skywalking-bin-x.y.z.tar.gz`.
     * See Section "Locate and download the distribution package in Apache Nexus Staging repositories" for more details.
     * Create a `.sha512` package: `shasum -a 512 file > file.sha512`
 
@@ -282,6 +282,22 @@ SkyWalking Resources:
 - Apache SkyWalking Team
 ```
 
+## Publish the Docker images
+
+```shell
+export SW_VERSION=x.y.z
+git clone --depth 1 --branch v$SW_VERSION https://github.com/apache/skywalking.git
+cd skywalking
+
+svn co https://dist.apache.org/repos/dist/release/skywalking/$SW_VERSION release # (1)
+
+export CONTEXT=release
+export HUB=apache
+export TAG=$SW_VERSION
+export DIST=<the binary package name inside (1), e.g. apache-skywalking-apm-8.8.0.tar.gz>
+make docker.all && make docker.push
+```
+
 ## Clean up the old releases
 Once the latest release has been published, you should clean up the old releases from the mirror system.
 1. Update the download links (source, dist, asc, and sha512) on the website to the archive repo (https://archive.apache.org/dist/skywalking).
diff --git a/docs/en/setup/backend/docker.md b/docs/en/setup/backend/docker.md
new file mode 100644
index 0000000..a0a34c6
--- /dev/null
+++ b/docs/en/setup/backend/docker.md
@@ -0,0 +1,25 @@
+# How to use the Docker images
+
+## Start a `standlone` container with `H2` storage
+
+```shell
+docker run --name oap --restart always -d apache/skywalking-oap-server:8.8.0
+```
+
+## Start a `standlone` container with ElasticSearch 7 as storage whose address is `elasticsearch:9200`
+
+```shell
+docker run --name oap --restart always -d -e SW_STORAGE=elasticsearch -e SW_STORAGE_ES_CLUSTER_NODES=elasticsearch:9200 apache/skywalking-oap-server:8.8.0
+```
+
+# Configuration
+
+We could set up environment variables to configure this image. They are defined in [backend-setup](https://skywalking.apache.org/docs/main/latest/en/setup/backend/backend-setup/).
+
+# Extend image
+
+If you intend to override or add config files in `/skywalking/config`, `/skywalking/ext-config` is the location for you to put extra files.
+The files with the same name will be overridden, otherwise, they will be added in `/skywalking/config`.
+
+If you want to add more libs/jars into the classpath of OAP, for example, new metrics for OAL. These jars can be mounted into `/skywalking/ext-libs`, then
+`entrypoint` bash will append them into the classpath. Notice, you can't override an existing jar in classpath.
diff --git a/docs/en/setup/backend/ui-setup.md b/docs/en/setup/backend/ui-setup.md
index 6462c94..982db29 100644
--- a/docs/en/setup/backend/ui-setup.md
+++ b/docs/en/setup/backend/ui-setup.md
@@ -32,3 +32,18 @@ spring:
 
 ```
 
+## Start with Docker Image
+
+Start a container to connect oap server whose address is `http://oap:12800`.
+
+```shell
+docker run --name oap --restart always -d -e SW_OAP_ADDRESS=http://oap:12800 apache/skywalking-ui:8.8.0
+```
+
+### Configuration
+
+We could set up environment variables to configure this image.
+
+### SW_OAP_ADDRESS
+
+The address of OAP server. Default value is `http://127.0.0.1:12800`.
diff --git a/docs/menu.yml b/docs/menu.yml
index e017c71..f01edcf 100644
--- a/docs/menu.yml
+++ b/docs/menu.yml
@@ -65,6 +65,8 @@ catalog:
         catalog:
           - name: "Quick Start"
             path: "/en/setup/backend/backend-setup"
+          - name: "Quick Start with Docker"
+            path: "/en/setup/backend/docker"
           - name: "Configuration Vocabulary"
             path: "/en/setup/backend/configuration-vocabulary"
           - name: "Advanced Setup"
diff --git a/oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/ElasticSearch.java b/oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/ElasticSearch.java
index 54226e3..8b416dc 100644
--- a/oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/ElasticSearch.java
+++ b/oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/ElasticSearch.java
@@ -145,6 +145,7 @@ public final class ElasticSearch implements Closeable {
             log.info("ElasticSearch version is: {}", v);
             version.complete(v);
         });
+        endpointGroup.whenReady().thenAccept(healthyEndpointListener);
         endpointGroup.addListener(healthyEndpointListener);
         return future;
     }
diff --git a/test/e2e/e2e-test/docker/base-compose.yml b/test/e2e/e2e-test/docker/base-compose.yml
index ca77d24..d9077a3 100644
--- a/test/e2e/e2e-test/docker/base-compose.yml
+++ b/test/e2e/e2e-test/docker/base-compose.yml
@@ -27,6 +27,7 @@ services:
       - e2e
     volumes:
       - ./download-mysql.sh:/download-mysql.sh
+      - ./log4j2.xml:/skywalking/config/log4j2.xml
     environment:
       SW_CLUSTER_ZK_HOST_PORT: zk:2181
       SW_STORAGE_ES_CLUSTER_NODES: es:9200
diff --git a/docker/oap/log4j2.xml b/test/e2e/e2e-test/docker/log4j2.xml
similarity index 100%
copy from docker/oap/log4j2.xml
copy to test/e2e/e2e-test/docker/log4j2.xml