diff --git a/Makefile b/Makefile index 0f72bae3..ed9cb92d 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ endef define build_image_dev $(ENV_DOCKER) build -t $(ENV_APISIX_IMAGE_TAG_NAME)-debian-dev \ --build-arg CODE_PATH=$(1) \ - --build-arg ENTRYPOINT=debian-dev/docker-entrypoint.sh \ + --build-arg ENTRYPOINT_PATH=debian-dev/docker-entrypoint.sh \ -f ./debian-dev/Dockerfile.local . endef diff --git a/debian-dev/Dockerfile.local b/debian-dev/Dockerfile.local index 0e540dd5..ac5b105f 100644 --- a/debian-dev/Dockerfile.local +++ b/debian-dev/Dockerfile.local @@ -20,7 +20,6 @@ FROM debian:bullseye-slim AS build ARG ENABLE_PROXY=false -ARG ENTRYPOINT_PATH=./docker-entrypoint.sh ARG CODE_PATH ENV DEBIAN_FRONTEND noninteractive @@ -44,6 +43,8 @@ RUN set -x \ FROM debian:bullseye-slim +ARG ENTRYPOINT_PATH=./docker-entrypoint.sh + COPY --from=build /usr/local/apisix /usr/local/apisix COPY --from=build /usr/local/openresty /usr/local/openresty COPY --from=build /usr/bin/apisix /usr/bin/apisix diff --git a/debian-dev/docker-entrypoint.sh b/debian-dev/docker-entrypoint.sh index 1fe8c44c..1fb4f10e 100755 --- a/debian-dev/docker-entrypoint.sh +++ b/debian-dev/docker-entrypoint.sh @@ -55,6 +55,10 @@ _EOC_ rm -f "/usr/local/apisix/conf/config_listen.sock" fi + if [ -e "/usr/local/apisix/logs/worker_events.sock" ]; then + rm -f "/usr/local/apisix/logs/worker_events.sock" + fi + exec /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;' fi