Skip to content

Commit

Permalink
feat: add test-nginx toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 committed Nov 21, 2024
1 parent 9387821 commit d8a2027
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,15 @@ RUN apt update && export DEBIAN_FRONTEND=noninteractive \
COPY Makefile .requirements apisix-master-0.rockspec ./
COPY utils/install-dependencies.sh utils/linux-install-luarocks.sh utils/

RUN make deps
RUN make install-runtime

RUN cpanm --notest Test::Nginx IPC::Run > build.log 2>&1 || (cat build.log && exit 1)

ARG ETCD_VER=v3.5.17
ARG BUILDARCH
RUN curl -L https://github.com/etcd-io/etcd/releases/download/${ETCD_VER}/etcd-${ETCD_VER}-linux-${BUILDARCH}.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-${BUILDARCH}.tar.gz \
&& mkdir -p /tmp/etcd-download-test \
&& tar xzvf /tmp/etcd-${ETCD_VER}-linux-${BUILDARCH}.tar.gz -C /tmp/etcd-download-test --strip-components=1 \
&& mv /tmp/etcd-download-test/etcdctl /usr/bin \
&& rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz && rm -rf /tmp/etcd-download-test \
&& rm -rf /tmp/*
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"dockerComposeFile": ["docker-compose.yml"],
"service": "apisix",
"workspaceFolder": "/workspace",
"postCreateCommand": "bash -c 'cd /workspace && make deps'",
"privileged": true,
"postCreateCommand": "bash -c 'cd /workspace && rm -rf test-nginx && git config --global --add safe.directory /workspace && git submodule update --init --recursive && git clone https://github.com/openresty/test-nginx.git --depth 1 && make deps'",
"customizations": {
"vscode": {
"extensions": ["ms-vscode.makefile-tools", "ms-azuretools.vscode-docker", "sumneko.lua"]
Expand Down

0 comments on commit d8a2027

Please sign in to comment.