You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/25 04:32:44 UTC

[GitHub] [apisix-docker] gxthrj commented on a change in pull request #137: feat: support build apisix image from local code

gxthrj commented on a change in pull request #137:
URL: https://github.com/apache/apisix-docker/pull/137#discussion_r582537401



##########
File path: .github/workflows/apisix-alpine-local-docker-test.yaml
##########
@@ -0,0 +1,43 @@
+name: APISIX Alpine local docker Test
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Build and run
+        run: |
+          git clone http://github.com/apache/apisix
+          export APISIX_PATH="./apisix"

Review comment:
       May be better to use `./apisix-local` 

##########
File path: Makefile
##########
@@ -28,6 +28,10 @@ build-on-centos:
 build-on-alpine:
 	docker build -t $(IMAGE_NAME):$(APISIX_VERSION)-alpine -f ./alpine/Dockerfile .
 
+### build-on-alpine:      Build apaceh/apisix:xx-alpine image
+build-on-alpine-local:
+	docker build -t $(IMAGE_NAME):alpine-local --build-arg APISIX_VERSION=${APISIX_PATH} -f ./alpine-local/Dockerfile .

Review comment:
       Because you are building the image from a local directory, you don’t need to specify APISIX_VERSION here.
   It is better to specify APISIX_VERSION when `git clone`.

##########
File path: .github/workflows/apisix-alpine-local-docker-test.yaml
##########
@@ -0,0 +1,43 @@
+name: APISIX Alpine local docker Test
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Build and run
+        run: |
+          git clone http://github.com/apache/apisix

Review comment:
       We need to specify APISIX_VERSION  when `git clone`. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org