Skip to content

Commit

Permalink
Using docker build '--build-arg'
Browse files Browse the repository at this point in the history
  • Loading branch information
little-cui committed Jun 28, 2021
1 parent 3313026 commit 0d4672e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.build → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 1 addition & 4 deletions scripts/build/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0d4672e

Please sign in to comment.