From c9f8a9d51ddfa549ba3c88855e5a71d1dace8a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=A5=87=E6=80=AA?= Date: Tue, 2 Jun 2020 15:34:03 +0800 Subject: [PATCH] fix(docker): fix path error (#290) * fix(docker): fix path error * test(docker): fix test error --- .github/workflows/build_packages.yaml | 16 ++++++++++++++++ deploy/docker/Dockerfile | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_packages.yaml b/.github/workflows/build_packages.yaml index 597fbb78ed..10cf3e81e3 100644 --- a/.github/workflows/build_packages.yaml +++ b/.github/workflows/build_packages.yaml @@ -86,6 +86,22 @@ jobs: docker buildx create --use --name mybuild - name: build docker image run: make docker + - name: tests docker image + run: | + container_id=$(docker run -d emqx/kuiper:$(git describe --tags --always)) + ip_address=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $container_id) + sleep 10 + if [ "$(curl ${ip_address}:9081)" != "OK" ]; then echo "docker image failed"; exit 1; fi + + container_id=$(docker run -d emqx/kuiper:$(git describe --tags --always)-slim) + ip_address=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $container_id) + sleep 10 + if [ "$(curl ${ip_address}:9081)" != "OK" ]; then echo "docker image failed"; exit 1; fi + + container_id=$(docker run -d emqx/kuiper:$(git describe --tags --always)-alpine) + ip_address=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $container_id) + sleep 10 + if [ "$(curl ${ip_address}:9081)" != "OK" ]; then echo "docker image failed"; exit 1; fi - name: build docker images if: github.event_name == 'release' run: | diff --git a/deploy/docker/Dockerfile b/deploy/docker/Dockerfile index 80f89cf5d0..48926b04a6 100644 --- a/deploy/docker/Dockerfile +++ b/deploy/docker/Dockerfile @@ -11,7 +11,7 @@ RUN make build_with_edgex \ RUN go build -o kuiper_conf_util deploy/docker/conf_util.go \ && upx ./kuiper_conf_util \ - && ln -s /go/kuiper/deploy/kuiper_conf_util /usr/bin/kuiper_conf_util + && ln -s /go/kuiper/kuiper_conf_util /usr/bin/kuiper_conf_util RUN ln -s /go/kuiper/deploy/docker/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh