-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add new image for ekuiper #13986
base: master
Are you sure you want to change the base?
add new image for ekuiper #13986
Conversation
Hello all, I don't know why the 'Naughty' check failed, it tell me |
Background:
Since our build system makes heavy use of Docker build cache, just rebuilding the all of the Dockerfiles won't cause any change. So we rely on periodic base image updates to address things like CVE updates and bug fixes in OS packages:
While the The recommendation is to use a more generic tag like official-images/library/golang Line 117 in 23d3ac0
Unfortunately, those are going to go away today with the release of Go The same is true for the official-images/library/python Line 179 in 23d3ac0
|
Signed-off-by: Rory Z <rory-z@outlook.com>
Hi @yosifkit, Thanks for for your detailed answers, now all check are passed |
Diff for d641654:diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..633ac89 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,20 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: Rory Z <rory-z@outlook.com> (@rory-z)
+GitRepo: https://github.com/lf-edge/ekuiper-docker.git
+GitFetch: refs/heads/main
+
+Tags: 1.8.0, 1.8, 1, latest
+Architectures: amd64, arm32v7, arm64v8
+GitCommit: fac81d8f7bfdaf8c36ddaa7c7d76b784cc3eb6fd
+Directory: 1.8
+
+Tags: 1.8.0-slim, 1.8-slim, 1-slim, slim
+Architectures: amd64, arm32v7, arm64v8
+GitCommit: fac81d8f7bfdaf8c36ddaa7c7d76b784cc3eb6fd
+Directory: 1.8
+File: Dockerfile-slim
+
+Tags: 1.8.0-slim-python, 1.8-slim-python, 1-slim-python, slim-python
+Architectures: amd64, arm32v7, arm64v8
+GitCommit: fac81d8f7bfdaf8c36ddaa7c7d76b784cc3eb6fd
+Directory: 1.8
+File: Dockerfile-slim-python
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..8063cf6 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,12 @@
+ekuiper:1
+ekuiper:1-slim
+ekuiper:1-slim-python
+ekuiper:1.8
+ekuiper:1.8-slim
+ekuiper:1.8-slim-python
+ekuiper:1.8.0
+ekuiper:1.8.0-slim
+ekuiper:1.8.0-slim-python
+ekuiper:latest
+ekuiper:slim
+ekuiper:slim-python
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index e69de29..4fc6568 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -0,0 +1,3 @@
+ekuiper:latest
+ekuiper:slim
+ekuiper:slim-python
diff --git a/ekuiper_latest/Dockerfile b/ekuiper_latest/Dockerfile
new file mode 100644
index 0000000..0b2bbe0
--- /dev/null
+++ b/ekuiper_latest/Dockerfile
@@ -0,0 +1,44 @@
+FROM golang:1.19-alpine AS builder
+
+RUN apk add gcc make git libc-dev zip curl jq bash binutils-gold pkgconfig zeromq-dev && \
+ mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
+
+WORKDIR /go
+
+ENV VSN=1.8.0
+RUN curl --silent --show-error -kfL -o ekuiper.tar.gz "https://github.com/lf-edge/ekuiper/archive/refs/tags/${VSN}.tar.gz" && \
+ mkdir -p ekuiper && \
+ tar -zxf ekuiper.tar.gz -C ekuiper --strip-components 1 && \
+ cd ekuiper && \
+ make build_with_edgex
+
+FROM alpine:3.16
+
+# Set environment vars
+ENV KUIPER_HOME="/kuiper" \
+ KUIPER_USER="kuiper" \
+ KUIPER_USER_ID="1001" \
+ KUIPER__BASIC__CONSOLELOG=true
+
+WORKDIR ${KUIPER_HOME}
+
+RUN apk add sed libzmq
+
+# Set appropriate ownership to allow binary full access to KUIPER_HOME dir
+RUN adduser -DH -s /sbin/nologin -u ${KUIPER_USER_ID} ${KUIPER_USER} && \
+ chown -Rh ${KUIPER_USER}:${KUIPER_USER} ${KUIPER_HOME} && \
+ mkdir -p /usr/local/taos && \
+ chown -Rh ${KUIPER_USER}:${KUIPER_USER} /usr/local/taos
+
+# Run the kuiper process under the kuiper user
+USER ${KUIPER_USER}
+
+COPY --chown=${KUIPER_USER}:${KUIPER_USER} docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
+COPY --chown=${KUIPER_USER}:${KUIPER_USER} --from=builder /go/ekuiper/_build/kuiper-* /kuiper/
+
+VOLUME ["${KUIPER_HOME}/etc", "${KUIPER_HOME}/data", "${KUIPER_HOME}/plugins", "${KUIPER_HOME}/log"]
+EXPOSE 9081 20498
+
+ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
+
+CMD ["./bin/kuiperd"]
diff --git a/ekuiper_latest/docker-entrypoint.sh b/ekuiper_latest/docker-entrypoint.sh
new file mode 100755
index 0000000..3bd7e54
--- /dev/null
+++ b/ekuiper_latest/docker-entrypoint.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Copyright 2021 EMQ Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if [ ! -z "$DEBUG" ]; then
+ set -ex
+else
+ set -e
+fi
+
+KUIPER_HOME=${KUIPER_HOME:-"/kuiper"}
+
+exec "$@"
diff --git a/ekuiper_slim-python/Dockerfile-slim-python b/ekuiper_slim-python/Dockerfile-slim-python
new file mode 100644
index 0000000..02b1b79
--- /dev/null
+++ b/ekuiper_slim-python/Dockerfile-slim-python
@@ -0,0 +1,45 @@
+FROM golang:1.19 AS builder
+
+RUN apt update -y --no-install-recommends && \
+ apt install -y --no-install-recommends make git curl procps zip libucl-dev zlib1g-dev pkg-config libczmq-dev build-essential debhelper jq zip
+
+RUN curl --silent --show-error -kfL -o upx.tar.xz "https://github.com/upx/upx/releases/download/v3.96/upx-3.96-src.tar.xz" && \
+ mkdir -p /usr/local/upx && \
+ tar -xf upx.tar.xz -C /usr/local/upx --strip-components 1 && \
+ cd /usr/local/upx && \
+ make all && \
+ ln -s /usr/local/upx/src/upx.out /usr/bin/upx
+
+WORKDIR /go
+
+ENV VSN=1.8.0
+RUN curl --silent --show-error -kfL -o ekuiper.tar.gz "https://github.com/lf-edge/ekuiper/archive/refs/tags/${VSN}.tar.gz" && \
+ mkdir -p ekuiper && \
+ tar -zxf ekuiper.tar.gz -C ekuiper --strip-components 1 && \
+ cd ekuiper && \
+ make build_with_edgex_and_script
+
+FROM python:3.8-slim-bullseye
+
+COPY --from=builder /go/ekuiper/_build/kuiper-* /kuiper/
+COPY --from=builder /go/ekuiper/sdk/python /sdk/python
+COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
+
+RUN apt-get update --no-install-recommends && \
+ apt-get install -y --no-install-recommends gcc pkg-config libczmq-dev libffi-dev wget cmake make git && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+
+WORKDIR /sdk/python
+RUN python3 setup.py sdist && python3 setup.py install
+
+ENV KUIPER_HOME="/kuiper" \
+ KUIPER__BASIC__CONSOLELOG=true
+
+WORKDIR ${KUIPER_HOME}
+
+EXPOSE 9081 20498
+
+ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
+
+CMD ["./bin/kuiperd"]
diff --git a/ekuiper_slim-python/docker-entrypoint.sh b/ekuiper_slim-python/docker-entrypoint.sh
new file mode 100755
index 0000000..3bd7e54
--- /dev/null
+++ b/ekuiper_slim-python/docker-entrypoint.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Copyright 2021 EMQ Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if [ ! -z "$DEBUG" ]; then
+ set -ex
+else
+ set -e
+fi
+
+KUIPER_HOME=${KUIPER_HOME:-"/kuiper"}
+
+exec "$@"
diff --git a/ekuiper_slim/Dockerfile-slim b/ekuiper_slim/Dockerfile-slim
new file mode 100644
index 0000000..8012a69
--- /dev/null
+++ b/ekuiper_slim/Dockerfile-slim
@@ -0,0 +1,41 @@
+FROM golang:1.19 AS builder
+
+RUN apt update -y --no-install-recommends && \
+ apt install -y --no-install-recommends make git curl procps zip libucl-dev zlib1g-dev pkg-config libczmq-dev build-essential debhelper jq zip
+
+RUN curl --silent --show-error -kfL -o upx.tar.xz "https://github.com/upx/upx/releases/download/v3.96/upx-3.96-src.tar.xz" && \
+ mkdir -p /usr/local/upx && \
+ tar -xf upx.tar.xz -C /usr/local/upx --strip-components 1 && \
+ cd /usr/local/upx && \
+ make all && \
+ ln -s /usr/local/upx/src/upx.out /usr/bin/upx
+
+WORKDIR /go
+
+ENV VSN=1.8.0
+RUN curl --silent --show-error -kfL -o ekuiper.tar.gz "https://github.com/lf-edge/ekuiper/archive/refs/tags/${VSN}.tar.gz" && \
+ mkdir -p ekuiper && \
+ tar -zxf ekuiper.tar.gz -C ekuiper --strip-components 1 && \
+ cd ekuiper && \
+ make build_with_edgex
+
+FROM debian:buster
+
+COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
+COPY --from=builder /go/ekuiper/_build/kuiper-* /kuiper/
+
+RUN apt-get update --no-install-recommends && \
+ apt-get install -y --no-install-recommends pkg-config libczmq-dev wget && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+
+ENV KUIPER_HOME="/kuiper" \
+ KUIPER__BASIC__CONSOLELOG=true
+
+WORKDIR ${KUIPER_HOME}
+
+EXPOSE 9081 20498
+
+ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
+
+CMD ["./bin/kuiperd"]
diff --git a/ekuiper_slim/docker-entrypoint.sh b/ekuiper_slim/docker-entrypoint.sh
new file mode 100755
index 0000000..3bd7e54
--- /dev/null
+++ b/ekuiper_slim/docker-entrypoint.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Copyright 2021 EMQ Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if [ ! -z "$DEBUG" ]; then
+ set -ex
+else
+ set -e
+fi
+
+KUIPER_HOME=${KUIPER_HOME:-"/kuiper"}
+
+exec "$@" |
Signed-off-by: Rory Z rory-z@outlook.com
Checklist for Review
NOTE: This checklist is intended for the use of the Official Images maintainers both to track the status of your PR and to help inform you and others of where we're at. As such, please leave the "checking" of items to the repository maintainers. If there is a point below for which you would like to provide additional information or note completion, please do so by commenting on the PR. Thanks! (and thanks for staying patient with us ❤️)
foobar
needs Node.js, hasFROM node:...
instead of grabbingnode
via other means been considered?)FROM scratch
, tarballs only exist in a single commit within the associated history?