Skip to content

Commit

Permalink
chore: jmalcloud镜像中去掉drawio并添加环境变量"JVM_OPTS"
Browse files Browse the repository at this point in the history
  • Loading branch information
jamebal committed May 31, 2024
1 parent f94a5ba commit 8483ed2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 41 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ARG VERSION

ENV MONGODB_URI "mongodb://mongo:27017/jmalcloud"
ENV RUN_ENVIRONMENT prod
ENV JVM_OPTS "-Xms50m -Xmx512m"
ENV LOG_LEVEL warn

ENV FILE_MONITOR true
Expand All @@ -24,9 +25,6 @@ ENV VERSION=${VERSION}
# 如果需要,可以根据需要更改此设置
ENV DOCKER_DEFAULT_PLATFORM=linux/amd64,linux/arm64

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 8088

EXPOSE 8088 8080

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD java -Dfile.encoding=UTF-8 -Dloader.path=/usr/local/clouddisk-lib -jar ${JVM_OPTS} /usr/local/clouddisk-${VERSION}.jar --spring.profiles.active=${RUN_ENVIRONMENT} --spring.data.mongodb.uri=${MONGODB_URI} --file.monitor=${FILE_MONITOR} --file.rootDir=${FILE_ROOT_DIR} --logging.level.root=${LOG_LEVEL} --file.ip2region-db-path=/jmalcloud/ip2region.xdb
6 changes: 0 additions & 6 deletions docker-entrypoint.sh

This file was deleted.

13 changes: 0 additions & 13 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@ RUN apt-get update && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8


# 安装 Tomcat
RUN wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.tar.gz && \
tar xzf apache-tomcat-9.0.89.tar.gz && \
mv apache-tomcat-9.0.89 /usr/local/tomcat && \
rm apache-tomcat-9.0.89.tar.gz

# 删除默认的 webapps 目录下的内容
RUN rm -rf /usr/local/tomcat/webapps/*

# 下载war包
RUN wget https://github.com/jgraph/drawio/releases/download/v24.4.10/draw.war -O /usr/local/tomcat/webapps/draw.war

# 设置环境变量
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
Expand Down
8 changes: 3 additions & 5 deletions docker/jmalcloud-nvidia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ARG VERSION

ENV MONGODB_URI "mongodb://mongo:27017/jmalcloud"
ENV RUN_ENVIRONMENT prod
ENV JVM_OPTS "-Xms50m -Xmx512m"
ENV LOG_LEVEL warn

ENV FILE_MONITOR true
Expand All @@ -24,9 +25,6 @@ ENV VERSION=${VERSION}
# 如果需要,可以根据需要更改此设置
ENV DOCKER_DEFAULT_PLATFORM=linux/amd64,linux/arm64

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 8088

EXPOSE 8088 8080

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD java -Dfile.encoding=UTF-8 -Dloader.path=/usr/local/clouddisk-lib -jar ${JVM_OPTS} /usr/local/clouddisk-${VERSION}.jar --spring.profiles.active=${RUN_ENVIRONMENT} --spring.data.mongodb.uri=${MONGODB_URI} --file.monitor=${FILE_MONITOR} --file.rootDir=${FILE_ROOT_DIR} --logging.level.root=${LOG_LEVEL} --file.ip2region-db-path=/jmalcloud/ip2region.xdb
12 changes: 0 additions & 12 deletions docker/nvidia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@ RUN wget https://repo.jellyfin.org/files/ffmpeg/ubuntu/latest-5.x/${ARCH}/jellyf
# 安装下载的 jellyfin-ffmpeg.deb
RUN dpkg -i jellyfin-ffmpeg5_5.1.4-3-jammy_${ARCH}.deb || apt-get install -fy

# 安装 Tomcat
RUN wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.tar.gz && \
tar xzf apache-tomcat-9.0.89.tar.gz && \
mv apache-tomcat-9.0.89 /usr/local/tomcat && \
rm apache-tomcat-9.0.89.tar.gz

# 删除默认的 webapps 目录下的内容
RUN rm -rf /usr/local/tomcat/webapps/*

# 下载war包
RUN wget https://github.com/jgraph/drawio/releases/download/v24.4.10/draw.war -O /usr/local/tomcat/webapps/draw.war

# 卸载 wget 并清理
RUN apt-get remove -y wget && apt-get clean && rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit 8483ed2

Please sign in to comment.