From 0d4672e7b3850eaeb5bcfd38a307db7ddd085e1c Mon Sep 17 00:00:00 2001 From: little-cui Date: Mon, 28 Jun 2021 17:23:42 +0800 Subject: [PATCH] Using docker build '--build-arg' --- Dockerfile.build => Dockerfile | 2 +- README.md | 2 ++ scripts/build/tools.sh | 5 +---- 3 files changed, 4 insertions(+), 5 deletions(-) rename Dockerfile.build => Dockerfile (92%) diff --git a/Dockerfile.build b/Dockerfile similarity index 92% rename from Dockerfile.build rename to Dockerfile index 29f455388..823511820 100644 --- a/Dockerfile.build +++ b/Dockerfile @@ -21,4 +21,4 @@ ENV GOPROXY https://goproxy.cn COPY . . -RUN bash -x scripts/build/local.sh linux {{RELEASE}} amd64 {{BUILD}} +RUN bash -x scripts/build/local.sh linux $RELEASE amd64 $BUILD diff --git a/README.md b/README.md index d7492767c..0aee367fc 100644 --- a/README.md +++ b/README.md @@ -134,10 +134,12 @@ This will bring up Service Center listening on ip/port 127.0.0.1:30100 for servi [github-release]: https://github.com/servicecomb/service-center/releases/ ### Build docker image + ```sh sudo bash scripts/docker/build-image/build.sh ``` it builds a image servicecomb/service-center + ### Running Frontend using the Release You can download our latest release from ServiceComb Website and then untar it and run start-frontend.sh/start-frontend.bat. diff --git a/scripts/build/tools.sh b/scripts/build/tools.sh index 5fefcac2e..69508f467 100644 --- a/scripts/build/tools.sh +++ b/scripts/build/tools.sh @@ -190,10 +190,7 @@ docker_builder_pattern() { set -e cd $dockerfile_dir - cp -pf Dockerfile.build Dockerfile - sed -i "s|{{RELEASE}}|${RELEASE}|g" Dockerfile - sed -i "s|{{BUILD}}|${BUILD}|g" Dockerfile - docker build -t $builder_name . + docker build --build-arg RELEASE=${RELEASE} --build-arg BUILD=${BUILD} -t $builder_name . docker create --name builder $builder_name docker cp builder:$builder_path/$app $output docker rm -f builder