创建目录, 用于存放配置文件。
$ mkdir -p ~/springboot/icsp
icsp: 为项目运行目录,项目目录下有app.war打包的可运行的springboot包。
部署命令
docker run -d -p 8081:80 --name fast-icsp -v ~/springboot/icsp:/cloud/springboot 19880909/fast-springboot
修改容器时间和时区
#docker exec -it container_id env LANG=C.UTF-8 /bin/bash
修改时区,设置为上海时区
#ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 或者 #cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
更新centos源
/etc/yum.repos.d/
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum makecache
安装字体
拷贝文件:docker cp /root/fonts/ container_id:/usr/share/fonts/
查看中文安装情况:fc-list :lang=zh
安装工具:yum install -y fontconfig mkfontscale
cd /usr/share/fonts/
mkfontscale
mkfontdir
fc-cache
Content type
Image
Digest
Size
286.9 MB
Last updated
almost 7 years ago
docker pull 19880909/fast-springboot