Skip to content

Commit

Permalink
udpate build-export-container.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Jul 11, 2024
1 parent 102bfe1 commit 3570c9f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions sapi/docker/build-export-container.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

:<<'COMMENT'
从运行中的容器 将 /usr/local/swoole-cli/ 文件夹 拷贝出来 并生成新容器镜像 和 导出镜像到磁盘
从运行中的容器 将 /usr/local/swoole-cli/ 文件夹 拷贝出来 并生成新容器镜像 ,并把新容器镜像导出为文件
COMMENT

Expand All @@ -19,6 +20,7 @@ cd ${__PROJECT__}


CONTAINER_BASE_IMAGE='docker.io/library/alpine:3.18'
CONTAIENR_NAME='swoole-cli-builder'
MIRROR=''
PLATFORM=''
ARCH=$(uname -m)
Expand All @@ -39,6 +41,10 @@ while [ $# -gt 0 ]; do
--mirror)
MIRROR="$2"
;;
--quickstart-container)
CONTAIENR_NAME='swoole-cli-alpine-dev'
# 从quickstart 生成的容器中拷贝 /usr/local/swoole-cli/ 文件夹,并生成新容器镜像
;;
--*)
echo "Illegal option $1"
;;
Expand All @@ -58,8 +64,8 @@ cd ${__PROJECT__}/var/build-export-container/

test -d swoole-cli && rm -rf swoole-cli

container_id='swoole-cli-builder'
docker cp $container_id:/usr/local/swoole-cli/ .

docker cp ${CONTAIENR_NAME}:/usr/local/swoole-cli/ .


cat > Dockerfile <<'EOF'
Expand Down

0 comments on commit 3570c9f

Please sign in to comment.