blob: b34834be3283d5190a7dba33582626ca5ff8e1c0 [file] [log] [blame]
FROM openjdk:8-jre-slim
MAINTAINER Guobiao Mo <guobiaomo@chinamobile.com>
EXPOSE 1680
RUN groupadd -r datalake && useradd -r -g datalake datalake
RUN mkdir /home/datalake
USER datalake
WORKDIR /home/datalake
#add the fat jar
COPY target/${JAR_FILE} /home/datalake/
COPY src/assembly/run.sh /home/datalake/
WORKDIR /home/datalake/db_init
ADD src/assembly/init_db/scripts/db_init .
USER root
RUN chmod 0755 ./*
WORKDIR /home/datalake
COPY src/assembly/init_db/db_scripts/init_db.sql .
COPY src/assembly/init_db/db_scripts/init_db_data.sql .
RUN apt update && \
apt install -y mariadb-client && \
apt install -y curl
USER datalake
CMD ["sh", "run.sh"]