docker基础镜像调整为kkfileview-base
This commit is contained in:
parent
782509376c
commit
bb461cd74a
|
@ -1,5 +1,4 @@
|
|||
FROM keking/kkfileview-jdk:latest
|
||||
MAINTAINER chenjh "842761733@qq.com"
|
||||
FROM keking/kkfileview-base:4.4.0
|
||||
ADD server/target/kkFileView-*.tar.gz /opt/
|
||||
ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-4.4.0-beta/bin
|
||||
ENV KKFILEVIEW_BIN_FOLDER=/opt/kkFileView-4.4.0-beta/bin
|
||||
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-4.4.0-beta/config/application.properties","-jar","/opt/kkFileView-4.4.0-beta/bin/kkFileView-4.4.0-beta.jar"]
|
||||
|
|
|
@ -11,15 +11,15 @@ RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.aliyun.com@g' /etc/apt/sources.li
|
|||
localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8 &&\
|
||||
locale-gen zh_CN.UTF-8 &&\
|
||||
# 安装微软字体
|
||||
# apt-get install -y --no-install-recommends ttf-mscorefonts-installer &&\
|
||||
apt-get install -y --no-install-recommends ttf-mscorefonts-installer &&\
|
||||
# 安装文泉驿字体
|
||||
# apt-get install -y --no-install-recommends ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy &&\
|
||||
apt-get install -y --no-install-recommends ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy &&\
|
||||
# 清理临时文件
|
||||
apt-get autoremove -y &&\
|
||||
apt-get clean &&\
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 内置一些常用的中文字体,避免普遍性乱码. 建议安装思源字体 https://zh-cn.libreoffice.org/download/fonts/
|
||||
# 内置一些常用的中文字体,避免普遍性乱码
|
||||
ADD fonts/* /usr/share/fonts/chinese/
|
||||
|
||||
RUN cd /usr/share/fonts/chinese &&\
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
由于 kkfileview 的基础运行环境很少变动且制作耗时较久,而 kkfileview 本身代码开发会频繁改动,因此把制作其 Docker 镜像的步骤拆分为两次:
|
||||
|
||||
首先制作 kkfileview 的基础镜像(kkfileview-jdk)。
|
||||
首先制作 kkfileview 的基础镜像(kkfileview-base)。
|
||||
|
||||
然后使用 kkfileview-jdk 作为基础镜像进行构建,加快 kkfileview docker 镜像构建与发布。
|
||||
然后使用 kkfileview-base 作为基础镜像进行构建,加快 kkfileview docker 镜像构建与发布。
|
||||
|
||||
执行如下命令即可构建基础镜像:
|
||||
> 这里镜像 tag 以 4.4.0 为例,本项目所维护的 Dockerfile 文件考虑了跨平台兼容性。 如果你需要用到 arm64 架构镜像, 则在arm64 架构机器上同样执行下面的构建命令即可
|
||||
|
||||
```shell
|
||||
docker build --tag keking/kkfileview-jdk:4.4.0 .
|
||||
docker build --tag keking/kkfileview-base:4.4.0 .
|
||||
```
|
||||
|
||||
|
||||
|
@ -46,5 +46,5 @@ docker build --tag keking/kkfileview-jdk:4.4.0 .
|
|||
现在就可以愉快地开始构建了,构建命令示例:
|
||||
|
||||
```shell
|
||||
docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-jdk:4.4.0 --push .
|
||||
docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-base:4.4.0 --push .
|
||||
```
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
Since the base runtime environment for kkfileview rarely changes and takes a long time to build, while the kkfileview code itself is frequently updated, the process of building its Docker image is split into two steps:
|
||||
|
||||
First, create the base image for kkfileview (kkfileview-jdk).
|
||||
First, create the base image for kkfileview (kkfileview-base).
|
||||
|
||||
Then, use kkfileview-jdk as the base image to build and speed up the kkfileview Docker image build and release process.
|
||||
Then, use kkfileview-base as the base image to build and speed up the kkfileview Docker image build and release process.
|
||||
|
||||
To build the base image, run the following command:
|
||||
|
||||
> In this example, the image tag is 4.4.0. The Dockerfile maintained in this project considers cross-platform compatibility. If you need an arm64 architecture image, run the same build command on an arm64 architecture machine.
|
||||
|
||||
```shell
|
||||
docker build --tag keking/kkfileview-jdk:4.4.0 .
|
||||
docker build --tag keking/kkfileview-base:4.4.0 .
|
||||
```
|
||||
|
||||
|
||||
|
@ -49,5 +49,5 @@ Assuming the current machine is amd64 (x86_64) architecture, you'll need to enab
|
|||
Now you can enjoy the building. Here’s an example build command:
|
||||
|
||||
```shell
|
||||
docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-jdk:4.4.0 --push .
|
||||
docker buildx build --platform=linux/amd64,linux/arm64 -t keking/kkfileview-base:4.4.0 --push .
|
||||
```
|
Loading…
Reference in New Issue