From 55f10f6a4817a0301b7d483efae89e161cf9de09 Mon Sep 17 00:00:00 2001 From: jievince <38901892+jievince@users.noreply.github.com> Date: Fri, 5 Mar 2021 13:12:05 +0800 Subject: [PATCH] build nebula-tools docker image --- .github/workflows/docker.yaml | 1 + .github/workflows/release.yaml | 1 + docker/Dockerfile.tools | 18 ++++++++++++++++++ docker/README.md | 1 + docker/build-images.sh | 2 +- 5 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 docker/Dockerfile.tools diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 139d395caa7..1148d9741e9 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -16,6 +16,7 @@ jobs: - graphd - console - graph + - tools steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f5631bdae5e..6370d844dd0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -77,6 +77,7 @@ jobs: - graphd - console - graph + - tools steps: - uses: actions/checkout@v1 with: diff --git a/docker/Dockerfile.tools b/docker/Dockerfile.tools new file mode 100644 index 00000000000..d6ad6a6e039 --- /dev/null +++ b/docker/Dockerfile.tools @@ -0,0 +1,18 @@ +FROM vesoft/nebula-dev:centos7 as builder + +COPY . /home/nebula/BUILD + +RUN cd /home/nebula/BUILD/package \ + && ./package.sh -v $(git rev-parse --short HEAD) -n OFF + +FROM centos:7 + +COPY --from=builder /home/nebula/BUILD/build/cpack_output/nebula-*-tool.rpm /usr/local/nebula/nebula-tool.rpm + +WORKDIR /usr/local/nebula + +RUN rpm -ivh *.rpm \ + && rm -rf *.rpm + +# default entrypoint +ENTRYPOINT ["./bin/db_dump"] diff --git a/docker/README.md b/docker/README.md index d639eecb71c..27c6a1689c4 100644 --- a/docker/README.md +++ b/docker/README.md @@ -8,3 +8,4 @@ Following docker images will be ready in production. - [vesoft/nebula-metad](https://hub.docker.com/r/vesoft/nebula-metad): nebula-metad service built with `Dockerfile.metad` - [vesoft/nebula-storaged](https://hub.docker.com/r/vesoft/nebula-storaged): nebula-storaged service built with `Dockerfile.storaged` - [vesoft/nebula-console](https://hub.docker.com/r/vesoft/nebula-console): nebula console client built with `Dockerfile.console` +- [vesoft/nebula-tools](https://hub.docker.com/r/vesoft/nebula-tools): nebula tools built with `Dockerfile.tools` diff --git a/docker/build-images.sh b/docker/build-images.sh index 16587664d9d..d7c444f3ae7 100755 --- a/docker/build-images.sh +++ b/docker/build-images.sh @@ -7,6 +7,6 @@ PROJECT_DIR="$(cd "$(dirname "$0")" && pwd)"/../ -for suffix in graphd metad storaged console; do +for suffix in graphd metad storaged console tools; do docker build -t vesoft/nebula-$suffix:latest -f $PROJECT_DIR/docker/Dockerfile.$suffix $PROJECT_DIR done