Skip to content

Commit

Permalink
Merge branch 'master' of github.com:apache/apisix-docker into rm-cent
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek committed Oct 3, 2023
2 parents 7b539fe + e0ac41c commit 4aa4c04
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

- name: Test APISIX
run: |
sleep 50 #startup time maybe a little longer as the yq binary is downloaded for use at runtime
sleep 30
result_code=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/get`
if [[ $result_code -ne 200 ]];then
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/apisix_dev_push_docker_hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'apache/apisix:${{ APISIX_DOCKER_TAG }}'
image-ref: 'apache/apisix:${{ env.APISIX_DOCKER_TAG }}'
severity: 'CRITICAL,HIGH'
exit-code: 1
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ The response indicates that apisix is running successfully:

If you want to modify the default configuration of APISIX, you can use the following command to enter the APISIX container and modify the configuration file `./conf/config.yaml`, which will take effect after reloading APISIX. For details, please refer to `./conf/config-default.yaml`.

```
```shell
docker exec -it apache-apisix bash
```

Expand All @@ -165,7 +165,7 @@ For more information, you can refer to the [APISIX Website](https://apisix.apach

If you change your custom configuration, you can reload APISIX (without downtime) by issuing.

```
```shell
docker exec -it apache-apisix apisix reload
```
This will run the `apisix reload` command in your container.
Expand Down
1 change: 0 additions & 1 deletion all-in-one/apisix-dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ RUN set -x \
&& mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
&& apk del .builddeps build-base make unzip


# Build etcd
FROM alpine:3.13 AS etcd-stage

Expand Down
3 changes: 2 additions & 1 deletion all-in-one/apisix/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ USER root

RUN wget https://github.com/etcd-io/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz \
&& tar -zxvf etcd-${ETCD_VERSION}-linux-amd64.tar.gz \
&& mv etcd-${ETCD_VERSION}-linux-amd64/* /usr/bin/
&& mv etcd-${ETCD_VERSION}-linux-amd64/* /usr/bin/ \
&& rm /usr/local/openresty/bin/etcdctl


WORKDIR /usr/local/apisix
Expand Down
3 changes: 2 additions & 1 deletion dashboard/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ RUN set -x \
&& apk add --no-cache --virtual .builddeps git \
&& git clone https://github.com/apache/apisix-dashboard.git -b ${APISIX_DASHBOARD_TAG} /usr/local/apisix-dashboard \
&& cd /usr/local/apisix-dashboard && git clean -Xdf \
&& rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash
&& rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash \
&& rm /usr/local/openresty/bin/etcdctl

FROM --platform=$BUILDPLATFORM golang:1.19 as api-builder

Expand Down
9 changes: 4 additions & 5 deletions debian-dev/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ deployment:
config_provider: yaml
_EOC_
else
wget -qO /usr/local/apisix/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
&& chmod a+x /usr/local/apisix/yq
/usr/local/apisix/yq -i '.deployment.role = "data_plane"' ${PREFIX}/conf/config.yaml
/usr/local/apisix/yq -i '.deployment.role_data_plane.config_provider = "yaml"' ${PREFIX}/conf/config.yaml
rm /usr/local/apisix/yq
# updating config.yaml for standalone mode
sed -i 's/role: traditional/role: data_plane/' ${PREFIX}/conf/config.yaml
sed -i 's/role_traditional:/role_data_plane:/' ${PREFIX}/conf/config.yaml
sed -i 's/config_provider: etcd/config_provider: yaml/' ${PREFIX}/conf/config.yaml
fi

if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
Expand Down
1 change: 1 addition & 0 deletions debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ RUN set -ex; \
&& apt install -y apisix=${APISIX_VERSION}-0 \
&& apt-get purge -y --auto-remove \
&& rm -f /etc/apt/sources.list.d/openresty.list /etc/apt/sources.list.d/apisix.list \
&& rm /usr/local/openresty/bin/etcdctl \
&& openresty -V \
&& apisix version

Expand Down
9 changes: 4 additions & 5 deletions debian/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ deployment:
config_provider: yaml
_EOC_
else
wget -qO /usr/local/apisix/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
&& chmod a+x /usr/local/apisix/yq
/usr/local/apisix/yq -i '.deployment.role = "data_plane"' ${PREFIX}/conf/config.yaml
/usr/local/apisix/yq -i '.deployment.role_data_plane.config_provider = "yaml"' ${PREFIX}/conf/config.yaml
rm /usr/local/apisix/yq
# updating config.yaml for standalone mode
sed -i 's/role: traditional/role: data_plane/' ${PREFIX}/conf/config.yaml
sed -i 's/role_traditional:/role_data_plane:/' ${PREFIX}/conf/config.yaml
sed -i 's/config_provider: etcd/config_provider: yaml/' ${PREFIX}/conf/config.yaml
fi

if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
Expand Down
3 changes: 2 additions & 1 deletion redhat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/

# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
&& ln -sf /dev/stderr /usr/local/apisix/logs/error.log
&& ln -sf /dev/stderr /usr/local/apisix/logs/error.log \
&& rm /usr/local/openresty/bin/etcdctl

EXPOSE 9080 9443

Expand Down
9 changes: 4 additions & 5 deletions redhat/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ deployment:
config_provider: yaml
_EOC_
else
wget -qO /usr/local/apisix/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
&& chmod a+x /usr/local/apisix/yq
/usr/local/apisix/yq -i '.deployment.role = "data_plane"' ${PREFIX}/conf/config.yaml
/usr/local/apisix/yq -i '.deployment.role_data_plane.config_provider = "yaml"' ${PREFIX}/conf/config.yaml
rm /usr/local/apisix/yq
# updating config.yaml for standalone mode
sed -i 's/role: traditional/role: data_plane/' ${PREFIX}/conf/config.yaml
sed -i 's/role_traditional:/role_data_plane:/' ${PREFIX}/conf/config.yaml
sed -i 's/config_provider: etcd/config_provider: yaml/' ${PREFIX}/conf/config.yaml
fi

if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
Expand Down

0 comments on commit 4aa4c04

Please sign in to comment.