From 4a571f5c49a91c0f3a5ec1d1b7ea7899b1eab375 Mon Sep 17 00:00:00 2001 From: qvlehao <2775257495@qq.com> Date: Fri, 28 Jul 2023 09:04:21 +0800 Subject: [PATCH] dockered openhufu-server --- docker/Dockerfile | 10 ++++++++++ scripts/build/image.sh | 6 ++++++ scripts/build/setup_docker.sh | 5 +++++ scripts/build/stop_docker.sh | 5 +++++ 4 files changed, 26 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 scripts/build/image.sh create mode 100644 scripts/build/setup_docker.sh create mode 100644 scripts/build/stop_docker.sh diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..9c9b466f --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,10 @@ +FROM openjdk:11 +COPY ../dataset ./dataset +WORKDIR /release +COPY ../release/config ./config +COPY ../release/bin ./bin +COPY ../release/adapter ./adapter +ADD ../release/*.sh ./ +ENTRYPOINT sh -c 'chmod 777 ./owner.sh' &&\ + sh -c './owner.sh start ./config/owner1.json' &&\ + sh -c 'tail -f /dev/null' \ No newline at end of file diff --git a/scripts/build/image.sh b/scripts/build/image.sh new file mode 100644 index 00000000..9c56f9eb --- /dev/null +++ b/scripts/build/image.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -ex + +./scripts/build/package.sh +docker build -f ./docker/Dockerfile -t openhufu-server:1.0 . \ No newline at end of file diff --git a/scripts/build/setup_docker.sh b/scripts/build/setup_docker.sh new file mode 100644 index 00000000..c6bee4c4 --- /dev/null +++ b/scripts/build/setup_docker.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +#set -ex + +docker run -d -t --name=openhufu-server openhufu-server:1.0 \ No newline at end of file diff --git a/scripts/build/stop_docker.sh b/scripts/build/stop_docker.sh new file mode 100644 index 00000000..bd19a931 --- /dev/null +++ b/scripts/build/stop_docker.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +#set -ex + +docker stop openhufu-server \ No newline at end of file