From 17a5020391650b3c6596fdbad7d2d921bc908791 Mon Sep 17 00:00:00 2001 From: zeekling Date: Sat, 23 Apr 2022 23:14:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=9F=E6=96=B0build=5Fdocker.sh=E7=9A=84?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bolo/README.md | 4 ++-- bolo/build_docker.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bolo/README.md b/bolo/README.md index c656428..9f5923e 100644 --- a/bolo/README.md +++ b/bolo/README.md @@ -5,8 +5,8 @@ 下面的dockerFiles和 settings.xml放置到博客bolo-solo的下面,执行下面命令编译并导出镜像: ```sh - docker build -t "zeek/bolo" . - + bash build_docker.sh + docker save -o /tmp/zeek_bolo.tar zeek/bolo ``` - 将`/tmp/zeek_bolo.tar`上传到服务器`/tmp`目录下面,并且导入: diff --git a/bolo/build_docker.sh b/bolo/build_docker.sh index 5d6657c..22f2c2d 100755 --- a/bolo/build_docker.sh +++ b/bolo/build_docker.sh @@ -1,5 +1,9 @@ #!/bin/bash +# +# 优化docker编译,只需要添加需要的文件 +# + mkdir -p /tmp/bolo-solo cp -rf ./Dockerfile ./gulpfile.js ./manifest.json ./package.json ./pom.xml src /tmp/bolo-solo