This is an automated email from the ASF dual-hosted git repository. kezhenxu94 pushed a commit to branch docker/agent in repository https://gitbox.apache.org/repos/asf/skywalking.git
commit 05571b7ac82f56635f9ae7d67852a566af65e916 Author: kezhenxu94 <kezhenx...@apache.org> AuthorDate: Mon Apr 5 15:43:48 2021 +0800 feature: add dockerfile for agent image --- Makefile | 6 +++++- docker/agent/Dockerfile.agent | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 69bff7e..4ec2a1e 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ ES_VERSION?=es6 docker: init build.all docker.all -DOCKER_TARGETS:=docker.oap docker.ui +DOCKER_TARGETS:=docker.oap docker.ui docker.agent docker.all: $(DOCKER_TARGETS) @@ -81,6 +81,10 @@ docker.ui: $(SW_ROOT)/docker/ui/docker-entrypoint.sh docker.ui: $(SW_ROOT)/docker/ui/logback.xml $(DOCKER_RULE) +docker.agent: $(SW_OUT)/apache-skywalking-apm-bin.tar.gz +docker.agent: $(SW_ROOT)/docker/agent/Dockerfile.agent + $(DOCKER_RULE) + # $@ is the name of the target # $^ the name of the dependencies for the target diff --git a/docker/agent/Dockerfile.agent b/docker/agent/Dockerfile.agent new file mode 100644 index 0000000..5560b4a --- /dev/null +++ b/docker/agent/Dockerfile.agent @@ -0,0 +1,32 @@ +# 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 as build + +ARG DIST_NAME + +WORKDIR /skywalking + +ADD "$DIST_NAME.tar.gz" / + +FROM apache/skywalking-base:8.4.0-es6 AS cli + +ARG BASE_IMAGE='adoptopenjdk/openjdk8:alpine' + +FROM $BASE_IMAGE + +COPY --from=build /agent /skywalking/agent +COPY --from=cli /skywalking/bin/swctl /skywalking/bin