You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by we...@apache.org on 2020/08/31 09:56:53 UTC

[apisix-docker] branch master updated: feat: add CI for alpine docker image (#70)

This is an automated email from the ASF dual-hosted git repository.

wenming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-docker.git


The following commit(s) were added to refs/heads/master by this push:
     new 86968b3  feat: add CI for alpine docker image (#70)
86968b3 is described below

commit 86968b3e9e092ea3fbaa04e0ae7f4b4ead332c43
Author: kv <gx...@163.com>
AuthorDate: Mon Aug 31 17:56:47 2020 +0800

    feat: add CI for alpine docker image (#70)
---
 .github/workflows/{linux_ci.yml => linux_alpine_ci.yaml}  | 4 ++--
 .github/workflows/linux_ci.yml                            | 2 +-
 example/README.md                                         | 4 +---
 example/{docker-compose.yml => docker-compose-alpine.yml} | 5 +++--
 example/docker-compose.yml                                | 1 +
 example/gen-config-yaml.sh                                | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/linux_ci.yml b/.github/workflows/linux_alpine_ci.yaml
similarity index 56%
copy from .github/workflows/linux_ci.yml
copy to .github/workflows/linux_alpine_ci.yaml
index dc15281..53c3876 100644
--- a/.github/workflows/linux_ci.yml
+++ b/.github/workflows/linux_alpine_ci.yaml
@@ -2,7 +2,7 @@ name: Docker compose CI on linux
 
 on:
   push:
-    branches: [ master ]
+    branches: [ master, kv/alpine ]
   pull_request:
     branches: [ master ]
 
@@ -12,4 +12,4 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - name: use docker-compose
-      run: cd ./example && docker-compose -p docker-apisix up -d
+      run: cd ./example && sh gen-config-yaml.sh && docker-compose -f docker-compose-alpine.yml -p docker-apisix up -d
diff --git a/.github/workflows/linux_ci.yml b/.github/workflows/linux_ci.yml
index dc15281..aec9dd9 100644
--- a/.github/workflows/linux_ci.yml
+++ b/.github/workflows/linux_ci.yml
@@ -12,4 +12,4 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - name: use docker-compose
-      run: cd ./example && docker-compose -p docker-apisix up -d
+      run: cd ./example && sh gen-config-yaml.sh && docker-compose -p docker-apisix up -d
diff --git a/example/README.md b/example/README.md
index cdd8d92..ca3d8af 100644
--- a/example/README.md
+++ b/example/README.md
@@ -1,9 +1,7 @@
 ### Run
 
 ```
-$ chmod +x gen-config-yaml.sh
-$ sh gen-config-yaml.sh
-$ docker-compose -p docker-apisix up -d
+$ sh gen-config-yaml.sh && docker-compose -p docker-apisix up -d
 ```
 
 ### Configure
diff --git a/example/docker-compose.yml b/example/docker-compose-alpine.yml
similarity index 94%
copy from example/docker-compose.yml
copy to example/docker-compose-alpine.yml
index d94eb70..e3fa700 100644
--- a/example/docker-compose.yml
+++ b/example/docker-compose-alpine.yml
@@ -4,14 +4,15 @@ services:
   apisix:
     build:
       context: ./..
-      dockerfile: centos/Dockerfile
+      dockerfile: alpine/Dockerfile
+      args:
+        APISIX_VERSION: master
     restart: always
     volumes:
       - ./apisix_log:/usr/local/apisix/logs
       - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
     depends_on:
       - etcd
-    ##network_mode: host
     ports:
       - "9080:9080/tcp"
       - "9443:9443/tcp"
diff --git a/example/docker-compose.yml b/example/docker-compose.yml
index d94eb70..109626b 100644
--- a/example/docker-compose.yml
+++ b/example/docker-compose.yml
@@ -1,6 +1,7 @@
 version: "3"
 
 services:
+
   apisix:
     build:
       context: ./..
diff --git a/example/gen-config-yaml.sh b/example/gen-config-yaml.sh
old mode 100644
new mode 100755
index 7a59529..07a81ab
--- a/example/gen-config-yaml.sh
+++ b/example/gen-config-yaml.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-export etcd_url='http://172.18.5.10:2379'
+export etcd_url='http://etcd:2379'
 
 wget https://raw.githubusercontent.com/apache/apisix/master/conf/config-default.yaml -O config.yaml