-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (29 loc) · 1.21 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM openeuler/openeuler:22.03
ARG NEW_YEAR_USER
ARG BRANCH
MAINTAINER zhongjun <[email protected]>
RUN mkdir -p /var/lib/ds
WORKDIR /var/lib/ds
RUN yum install -y wget \
&& wget https://mirrors-i.tuna.tsinghua.edu.cn/Adoptium/17/jdk/x64/linux/OpenJDK17U-jdk_x64_linux_hotspot_17.0.13_11.tar.gz \
&& tar -zxvf OpenJDK17U-jdk_x64_linux_hotspot_17.0.13_11.tar.gz \
&& wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz \
&& tar -xzvf apache-maven-3.8.8-bin.tar.gz \
&& yum install -y git
ENV JAVA_HOME=/var/lib/ds/jdk-17.0.13+11
ENV PATH=${JAVA_HOME}/bin:$PATH
ENV MAVEN_HOEM=/var/lib/ds/apache-maven-3.8.8
ENV PATH=$MAVEN_HOEM/bin:$PATH
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
WORKDIR /var/lib/ds/datastat-server
COPY . /var/lib/ds/datastat-server
ENV CONFIG_PATH=/opt/config
RUN mvn clean install package -Dmaven.test.skip && \
mv ./target/ds-0.0.1-SNAPSHOT.jar ../ds.jar
WORKDIR /var/lib/ds
RUN useradd -u 1000 datastat -s /bin/bash -m -U && \
git clone https://gitee.com/opensourceway/om-data.git && \
chown -R datastat:datastat om-data
USER datastat
CMD java -jar ds.jar --spring.config.location=${CONFIG_PATH}/application.properties