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