blob: e26063525ba3e0e224a3bd6c3cbe63553f8dd825 [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
CMD ["sh", "run.sh"]