From 9162540fe75d6f228a246e03ea1aa2ed07b1a33e Mon Sep 17 00:00:00 2001 From: Pil0tXia <41445332+Pil0tXia@users.noreply.github.com> Date: Thu, 31 Aug 2023 16:37:15 +0800 Subject: [PATCH] feat: add docker build manual and fix dockerhub push (#5) --- .github/workflows/build.yaml | 10 ++++++---- README.md | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 68384552..5e748a60 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,15 +26,17 @@ jobs: docker: runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 - 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 + uses: docker/build-push-action@v4 with: push: true - tags: eventmesh/eventmesh-dashboard:latest - file: ./docker/Dockerfile - context: ./ + tags: apache/eventmesh-dashboard:latest + file: docker/Dockerfile + context: . diff --git a/README.md b/README.md index c87e0421..c6d90a59 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,26 @@ You can start editing the page by modifying `pages/index.tsx`. The page auto-upd The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. +## Getting Started with Docker + +Pull the image and run the container by following commands: + +``` +docker pull apache/eventmesh-dashboard:latest +``` + +``` +docker run -d --name eventmesh-dashboard -p 8080:80 -t apache/eventmesh-dashboard:latest +``` + +Open [http://localhost:8080](http://localhost:8080) in your browser to see the result. + +You can also build a mirror of your own by executing the following command in the root of your git repository: + +``` +docker build -t /eventmesh-dashboard:latest -f docker/Dockerfile . +``` + ## Learn More To learn more about Next.js, take a look at the following resources: