This is an automated email from the ASF dual-hosted git repository. tanjian pushed a commit to branch docker-image in repository https://gitbox.apache.org/repos/asf/skywalking.git
commit 38607e8b746f8940be483686c5f91ce516f27695 Author: Jared.Tan <[email protected]> AuthorDate: Wed Jul 3 14:26:56 2019 +0800 Optimising docker image size. --- docker/oap/Dockerfile.oap | 6 +++++- docker/ui/Dockerfile.ui | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docker/oap/Dockerfile.oap b/docker/oap/Dockerfile.oap index 43ec2dd..e345b0b 100644 --- a/docker/oap/Dockerfile.oap +++ b/docker/oap/Dockerfile.oap @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM openjdk:8u181-jdk-stretch +FROM openjdk:8u181-jre-alpine AS builder ENV DIST_NAME=apache-skywalking-apm-bin \ JAVA_OPTS=" -Xms256M " \ @@ -30,6 +30,10 @@ RUN set -ex; \ rm -rf "$DIST_NAME/bin"; rm -rf "$DIST_NAME/webapp"; rm -rf "$DIST_NAME/agent"; \ mv "$DIST_NAME" skywalking; +FROM openjdk:8u181-jre-alpine + +COPY --from=builder /skywalking /skywalking + WORKDIR skywalking COPY log4j2.xml config/ diff --git a/docker/ui/Dockerfile.ui b/docker/ui/Dockerfile.ui index a52a148..7647c69 100644 --- a/docker/ui/Dockerfile.ui +++ b/docker/ui/Dockerfile.ui @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM openjdk:8u181-jdk-stretch +FROM openjdk:8u181-jre-alpine AS builder ENV DIST_NAME=apache-skywalking-apm-bin \ JAVA_OPTS=" -Xms256M " \ @@ -30,6 +30,10 @@ RUN set -ex; \ rm -rf "$DIST_NAME/bin"; rm -rf "$DIST_NAME/oap-libs"; rm -rf "$DIST_NAME/agent"; \ mv "$DIST_NAME" skywalking; +FROM openjdk:8u181-jre-alpine + +COPY --from=builder /skywalking /skywalking + WORKDIR skywalking COPY docker-entrypoint.sh .
