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/incubator-skywalking.git
The following commit(s) were added to refs/heads/master by this push: new f0a96f5 Fixed docker image can't run (#2275) f0a96f5 is described below commit f0a96f5f09622c2acf6938fac9e27ecbb3e1b35b Author: Gao Hongtao <hanahm...@gmail.com> AuthorDate: Fri Feb 22 10:48:41 2019 +0800 Fixed docker image can't run (#2275) - Set WORKDIR to skywalking - Change base image to openjdk:8u181-jdk-stretch which contains java tool-chains --- docker/Makefile | 12 +++++++----- docker/oap/Dockerfile | 16 +++++++--------- docker/ui/Dockerfile | 16 +++++++--------- docker/ui/docker-entrypoint.sh | 3 +-- 4 files changed, 22 insertions(+), 25 deletions(-) diff --git a/docker/Makefile b/docker/Makefile index 38a6847..6028f29 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -14,16 +14,18 @@ # See the License for the specific language governing permissions and # limitations under the License. +export DOCKER_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + oap: - cd oap; \ - cp ../../dist/apache-skywalking-apm-incubating-bin.tar.gz ./skywalking.tar.gz ; \ + cd $(DOCKER_ROOT)/oap; \ + cp ../../dist/apache-skywalking-apm-incubating-bin.tar.gz ./ ; \ docker build -t skywalking/oap:latest . ui: - cd ui; \ - cp ../../dist/apache-skywalking-apm-incubating-bin.tar.gz ./skywalking.tar.gz ; \ + cd $(DOCKER_ROOT)/ui; \ + cp ../../dist/apache-skywalking-apm-incubating-bin.tar.gz ./ ; \ docker build -t skywalking/ui:latest . - + build: oap ui .PHONY: oap ui \ No newline at end of file diff --git a/docker/oap/Dockerfile b/docker/oap/Dockerfile index 6533930..afa293d 100644 --- a/docker/oap/Dockerfile +++ b/docker/oap/Dockerfile @@ -14,23 +14,21 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM openjdk:8-jre-alpine +FROM openjdk:8u181-jdk-stretch -ENV DIST_NAME=skywalking \ +ENV DIST_NAME=apache-skywalking-apm-incubating-bin \ JAVA_OPTS=" -Xms256M " -# Install required packages -RUN apk add --no-cache \ - bash - COPY "$DIST_NAME.tar.gz" / 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"; + 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"; \ + mv "$DIST_NAME" skywalking; -WORKDIR $DIST_NAME +WORKDIR skywalking COPY log4j2.xml config/ COPY docker-entrypoint.sh . diff --git a/docker/ui/Dockerfile b/docker/ui/Dockerfile index c399963..9f2958e 100644 --- a/docker/ui/Dockerfile +++ b/docker/ui/Dockerfile @@ -14,23 +14,21 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM openjdk:8-jre-alpine +FROM openjdk:8u181-jdk-stretch -ENV DIST_NAME=skywalking \ +ENV DIST_NAME=apache-skywalking-apm-incubating-bin \ JAVA_OPTS=" -Xms256M " -# Install required packages -RUN apk add --no-cache \ - bash - COPY "$DIST_NAME.tar.gz" / RUN set -ex; \ 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"; + 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; -WORKDIR $DIST_NAME +WORKDIR skywalking COPY docker-entrypoint.sh . COPY logback.xml webapp/ diff --git a/docker/ui/docker-entrypoint.sh b/docker/ui/docker-entrypoint.sh index ef30a59..37fc457 100755 --- a/docker/ui/docker-entrypoint.sh +++ b/docker/ui/docker-entrypoint.sh @@ -18,5 +18,4 @@ set -ex -exec java -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \ - -jar webapp/skywalking-webapp.jar --logging.config=webapp/logback.xml "$@" +exec java -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -jar webapp/skywalking-webapp.jar --logging.config=webapp/logback.xml "$@"