Skip to content

Commit

Permalink
!42 使用openeuler基础镜像
Browse files Browse the repository at this point in the history
Merge pull request !42 from wu/master
  • Loading branch information
JoannaNil authored and gitee-org committed Jul 29, 2024
2 parents 0d0e73c + cad73ab commit 9a890ff
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
23 changes: 19 additions & 4 deletions DockerFile
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
FROM openjdk:8-jdk
FROM openeuler/openeuler:22.03

RUN mkdir -p /var/lib/om-kafka

WORKDIR /var/lib/om-kafka

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.12_7.tar.gz \
&& tar -zxvf OpenJDK17U-jdk_x64_linux_hotspot_17.0.12_7.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/om-kafka/jdk-17.0.12+7
ENV PATH=${JAVA_HOME}/bin:$PATH

ENV MAVEN_HOEM=/var/lib/om-kafka/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/om-kafka
COPY . /var/lib/om-kafka

# Install basic software support
RUN apt-get update && \
apt-get install --yes software-properties-common
ENV CONFIG_PATH=/opt/config/conf.properties

RUN wget https://mirror-hk.koddos.net/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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/Utils/PropertiesUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static Properties readProperties() throws IOException {
synchronized (Properties.class){
if(properties==null){
properties=new Properties();
InputStream resourceAsStream = new FileInputStream(System.getProperty("user.dir") +"/conf.properties");
InputStream resourceAsStream = new FileInputStream(System.getenv("CONFIG_PATH"));
properties.load(resourceAsStream);
}
}
Expand Down

0 comments on commit 9a890ff

Please sign in to comment.