You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/09/09 02:39:49 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #7681: Merge `Dockerfile`s in apache/skywalking-docker into this codebase

kezhenxu94 commented on a change in pull request #7681:
URL: https://github.com/apache/skywalking/pull/7681#discussion_r704906660



##########
File path: 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

Review comment:
       DONE




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

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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