Guobiao Mo | 6670cf9 | 2020-01-06 17:11:43 -0800 | [diff] [blame] | 1 | FROM openjdk:8-jre-slim |
Guobiao Mo | da70376 | 2019-02-22 15:36:27 -0800 | [diff] [blame] | 2 | |
| 3 | MAINTAINER Guobiao Mo <guobiaomo@chinamobile.com> |
| 4 | |
| 5 | EXPOSE 1680 |
| 6 | |
| 7 | RUN groupadd -r datalake && useradd -r -g datalake datalake |
| 8 | RUN mkdir /home/datalake |
| 9 | |
| 10 | USER datalake |
| 11 | |
| 12 | WORKDIR /home/datalake |
| 13 | |
| 14 | #add the fat jar |
Guobiao Mo | 6670cf9 | 2020-01-06 17:11:43 -0800 | [diff] [blame] | 15 | COPY target/${JAR_FILE} /home/datalake/ |
Guobiao Mo | da70376 | 2019-02-22 15:36:27 -0800 | [diff] [blame] | 16 | COPY src/assembly/run.sh /home/datalake/ |
| 17 | |
Kate Hsuan | 3034e7c | 2020-03-02 08:54:04 +0000 | [diff] [blame^] | 18 | WORKDIR /home/datalake/db_init |
| 19 | ADD src/assembly/init_db/scripts/db_init . |
| 20 | USER root |
| 21 | RUN chmod 0755 ./* |
| 22 | WORKDIR /home/datalake |
| 23 | COPY src/assembly/init_db/db_scripts/init_db.sql . |
| 24 | COPY src/assembly/init_db/db_scripts/init_db_data.sql . |
| 25 | |
| 26 | RUN apt update && \ |
| 27 | apt install -y mariadb-client && \ |
| 28 | apt install -y curl |
| 29 | |
Guobiao Mo | da70376 | 2019-02-22 15:36:27 -0800 | [diff] [blame] | 30 | CMD ["sh", "run.sh"] |
| 31 | |