Skip to content

Commit

Permalink
fix v1.2 docker build issue (apache#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
totemofwolf authored May 1, 2020
1 parent da37a28 commit d83f738
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

1. install release version (Apache releases are beginning from version 0.9):
```
docker build -t apisix:1.1-alpine --build-arg APISIX_VERSION=1.1 -f alpine/Dockerfile alpine
# Assign Apache release version number to variable `APISIX_VERSION`, for example: 1.2 . The latest version can be find at `https://github.com/apache/incubator-apisix/releases`
APISIX_VERSION=1.2
docker build -t apisix:${APISIX_VERSION}-alpine --build-arg APISIX_VERSION=${APISIX_VERSION} -f alpine/Dockerfile alpine
```

2. install master branch version, which has latest code(ONLY for the developer's convenience):
Expand Down
2 changes: 1 addition & 1 deletion alpine/hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# hooks/build
# https://docs.docker.com/docker-cloud/builds/advanced/

docker build --build-arg APISIX_VERSION=$APISIX_VERSION -t $IMAGE_NAME:${APISIX_VERSION}-alpine .
docker build --build-arg APISIX_VERSION=$APISIX_VERSION -t $IMAGE_NAME .
2 changes: 1 addition & 1 deletion centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG APISIX_VERSION=1.2
LABEL apisix_version="${APISIX_VERSION}"

RUN yum -y install yum-utils\
&& yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo \
&& yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo \
&& yum install -y openresty \
&& yum install -y https://github.com/apache/incubator-apisix/releases/download/$APISIX_VERSION/apisix-$APISIX_VERSION-0.el7.noarch.rpm \
&& yum clean all \
Expand Down
5 changes: 5 additions & 0 deletions centos/hooks/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# hooks/build
# https://docs.docker.com/docker-cloud/builds/advanced/

docker build --build-arg APISIX_VERSION=$APISIX_VERSION -t $IMAGE_NAME .

0 comments on commit d83f738

Please sign in to comment.