You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2020/12/08 07:20:04 UTC

[skywalking-swck] branch master updated: Add Dockerfile for release (#15)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4cce439  Add Dockerfile for release (#15)
4cce439 is described below

commit 4cce439030944d0fb705ea1a4d8e5c911b3e2615
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Tue Dec 8 15:19:45 2020 +0800

    Add Dockerfile for release (#15)
    
    Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
 build/images/Dockerfile.release | 56 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/build/images/Dockerfile.release b/build/images/Dockerfile.release
new file mode 100644
index 0000000..edd3c75
--- /dev/null
+++ b/build/images/Dockerfile.release
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+FROM alpine:3.12.1 AS builder
+
+RUN apk add --no-cache bash gettext nmap-ncat openssl busybox-extras
+
+ARG version
+
+# SWCK version
+ENV SWCK_VERSION ${version}
+
+# SWCK home
+ENV SWCK_HOME  /swck
+
+WORKDIR  ${SWCK_HOME}
+
+# Setup
+RUN set -eux; \
+    apk add --virtual .build-deps curl gnupg unzip
+
+# Download 
+RUN set -eux; \
+    curl https://archive.apache.org/dist/skywalking/swck/${SWCK_VERSION}/skywalking-swck-${SWCK_VERSION}-bin.tgz -o swck.tgz; \
+    curl https://archive.apache.org/dist/skywalking/swck/${SWCK_VERSION}/skywalking-swck-${SWCK_VERSION}-bin.tgz.asc -o swck.tgz.asc; \
+	curl https://downloads.apache.org/skywalking/KEYS -o KEYS
+
+# Install
+RUN set -eux; \
+	gpg --import KEYS; \
+    gpg --batch --verify swck.tgz.asc swck.tgz; \
+    tar -xvf swck.tgz --strip-components=1; \
+	rm swck.tgz ; \
+    rm swck.tgz.asc KEYS; \
+	apk del .build-deps ; \
+    rm -rf /var/cache/apk/* ; \
+    rm -rf /tmp/*
+
+FROM gcr.io/distroless/static:nonroot
+WORKDIR /tmp
+COPY --from=builder --chown=nonroot:nonroot /swck/bin/manager-linux-amd64 /bin/manager
+USER nonroot:nonroot
+
+ENTRYPOINT ["/bin/manager"]