aboutsummaryrefslogtreecommitdiffstats
path: root/packages/docker
diff options
context:
space:
mode:
authorHengye <yehui.wang@est.tech>2019-03-07 11:32:31 +0000
committerHengye <yehui.wang@est.tech>2019-03-07 11:32:31 +0000
commitdab3085222371ba0794a5ab31cee2dcde9054167 (patch)
tree32e14a7ecd9b9d74aa1802e53c5c04508cb348a9 /packages/docker
parent735a46f19a7cd89c2336fa38c2a9cea949fe3202 (diff)
Use Alpine as base docker image in /policy/engine
Issue-ID: POLICY-1552 Change-Id: Ibd67ca0cbec9e358c0a934821319e62dda46e3b2 Signed-off-by: Hengye <yehui.wang@est.tech>
Diffstat (limited to 'packages/docker')
-rw-r--r--packages/docker/src/main/docker/Dockerfile28
1 files changed, 8 insertions, 20 deletions
diff --git a/packages/docker/src/main/docker/Dockerfile b/packages/docker/src/main/docker/Dockerfile
index b7ed904f5..dd30a9576 100644
--- a/packages/docker/src/main/docker/Dockerfile
+++ b/packages/docker/src/main/docker/Dockerfile
@@ -1,4 +1,4 @@
-FROM ubuntu:14.04
+FROM alpine:3.9
ARG HTTP_PROXY=${HTTP_PROXY}
ARG HTTPS_PROXY=${HTTPS_PROXY}
@@ -9,29 +9,17 @@ ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
ENV BUILD_VERSION ${BUILD_VERSION}
ENV POLICY_LOGS ${POLICY_LOGS}
+ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
-RUN \
- apt-get clean && \
- apt-get update && \
- apt-get install -y zip unzip curl wget ssh telnet maven && \
- apt-get install -y software-properties-common && \
- apt-get install -y jq httpie && \
- apt-get install -y python-pip && \
- add-apt-repository ppa:openjdk-r/ppa && \
- apt-get clean && \
- apt-get update && \
- apt-get install -y openjdk-8-jdk
+RUN apk --update add --no-cache busybox-extras \
+ bash zip unzip curl \
+ wget openssh maven jq \
+ httpie py-pip openjdk8
-RUN useradd --create-home --shell /bin/bash policy
+RUN adduser -S policy -s /bin/bash
# install MariaDB client
-RUN \
- apt-get install -y apt-transport-https && \
- apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db && \
- add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main' && \
- apt-get clean && \
- apt-get update && \
- apt-get install -y mariadb-client
+RUN apk --update add --no-cache mariadb-client
RUN mkdir -p /opt/app/policy /tmp/policy-install ${POLICY_LOGS} && \
chown policy /opt/app/policy /tmp/policy-install ${POLICY_LOGS}