This is an automated email from the ASF dual-hosted git repository.
chenguangsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 2e6e6bfbd fix: build image
new 7d3bbde05 Merge pull request #3758 from shaowenchen/fix_build_image
2e6e6bfbd is described below
commit 2e6e6bfbdc3ee629eff93ef8804094c88f8bbc6b
Author: chenshaowen <“[email protected]”>
AuthorDate: Wed Apr 19 08:17:40 2023 +0800
fix: build image
Signed-off-by: chenshaowen <“[email protected]”>
---
.dockerignore | 2 ++
.../Dockerfile => .github/workflows/build.yaml | 33 ++++++++++++++--------
.licenserc.yaml | 1 +
docker/{eventmesh => }/Dockerfile | 28 ++++++++++--------
4 files changed, 40 insertions(+), 24 deletions(-)
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..c0f64a836
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,2 @@
+dist/
+build/
diff --git a/docker/centos7-jdk8/Dockerfile b/.github/workflows/build.yaml
similarity index 60%
rename from docker/centos7-jdk8/Dockerfile
rename to .github/workflows/build.yaml
index 7d968413d..67af54f16 100644
--- a/docker/centos7-jdk8/Dockerfile
+++ b/.github/workflows/build.yaml
@@ -16,16 +16,25 @@
# specific language governing permissions and limitations
# under the License.
#
+name: Build
+on:
+ push:
+ branches:
+ - master
-FROM docker.io/centos:7
-
-MAINTAINER mikexue <[email protected]>
-
-RUN yum update -y && yum install net-tools -y && yum install lrzsz -y && yum
install vim -y
-ADD jdk-8u281-linux-x64.tar.gz /usr/local/src/
-RUN ln -s /usr/local/src/jdk1.8.0_281/ /usr/local/jdk
-
-ENV JAVA_HOME /usr/local/jdk
-ENV JRE_HOME $JAVA_HOME/jre
-ENV CLASSPATH .:$JAVA_HOME/lib/:$JRE_HOME/lib/
-ENV PATH $PATH:$JAVA_HOME/bin
+jobs:
+ docker:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Login to DockerHub
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_PASSWORD }}
+ - name: Build and push
+ uses: docker/build-push-action@v3
+ with:
+ push: true
+ tags: eventmesh/eventmesh:latest
+ file: ./docker/Dockerfile
+ context: ./
diff --git a/.licenserc.yaml b/.licenserc.yaml
index 10eb24fc3..040673a61 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -27,6 +27,7 @@ header:
- '.gitmodules'
- '**/.gitkeep'
- '**/.gitignore'
+ - '**/.dockerignore'
- '**/*.md'
- '**/*.json'
- '**/*.ftl'
diff --git a/docker/eventmesh/Dockerfile b/docker/Dockerfile
similarity index 61%
rename from docker/eventmesh/Dockerfile
rename to docker/Dockerfile
index 6ea5944d1..14b76af87 100644
--- a/docker/eventmesh/Dockerfile
+++ b/docker/Dockerfile
@@ -16,20 +16,24 @@
# specific language governing permissions and limitations
# under the License.
#
+FROM openjdk:8-jdk as builder
+WORKDIR /build
+COPY . .
+RUN ./gradlew clean build jar dist --parallel --daemon
+RUN ./gradlew installPlugin
-FROM centos7-jdk8:latest
+FROM openjdk:8-jdk
+RUN apt-get update && apt-get install -y locales
+RUN localedef -i en_US -f UTF-8 en_US.UTF-8 --quiet
+WORKDIR /data/app/eventmesh
+COPY --from=builder /build/dist ./
-MAINTAINER mikexue [email protected]
-
-WORKDIR /data
-RUN mkdir /data/app
-ADD EventMesh_1.3.0-release.tar.gz /data/app/eventmesh
-WORKDIR /data/app/eventmesh/bin
-
-EXPOSE 10000
-EXPOSE 10105
+EXPOSE 10106
+EXPOSE 10205 10105 10002
ENV DOCKER true
+ENV EVENTMESH_HOME /data/app/eventmesh
+ENV EVENTMESH_LOG_HOME /data/app/eventmesh/logs
+ENV CONFPATH /data/app/eventmesh/conf
-CMD sh start.sh
-
+CMD ["bash", "bin/start.sh"]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]