Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
power-node
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
power-node
Commits
69236a4a
Commit
69236a4a
authored
Feb 06, 2024
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update docker file
parent
ca2b59cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
9 deletions
+26
-9
Dockerfile
Dockerfile
+13
-2
build.sh
build.sh
+8
-0
start.sh
start.sh
+5
-7
No files found.
Dockerfile
View file @
69236a4a
...
...
@@ -12,14 +12,25 @@ WORKDIR /build
RUN
git clone https://code.wuban.net.cn/odysseus/power-node
&&
\
git clone https://code.wuban.net.cn/odysseus/odysseus-protocol
RUN
cd
/build/power-node
&&
sh start.sh
&&
cp
powerNode /powerNode
&&
cp
config.json /config.json
&&
mkdir
/conf
&&
cp
conf/app.conf /conf/app.conf
RUN
cd
/power-node
&&
sh build.sh
&&
cp
powerNode /powerNode
RUN
cp
config.json /config.json
&&
mkdir
/conf
&&
cp
conf/app.conf /conf/app.conf
RUN
cp
start.sh /start.sh
FROM
alpine
WORKDIR
/root
COPY
--from=build /start.sh /usr/bin/start.sh
COPY
--from=build /powerNode /usr/bin/powerNode
COPY
--from=build /config.json /root/config.json
COPY
--from=build /conf /root/conf
ENTRYPOINT
[ "powerNode" ]
\ No newline at end of file
# Expose the port that the application listens on
EXPOSE
9090
ENTRYPOINT
[ "/start.sh"]
\ No newline at end of file
build.sh
0 → 100644
View file @
69236a4a
#!/bin/bash
rm
-rf
node node.log mydb
echo
"rm data successful"
go get
echo
"go get successful"
go build
-o
powerNode ./cmd
echo
"build successful"
\ No newline at end of file
start.sh
View file @
69236a4a
#!/bin/bash
echo
"Received
$REWARD_ADDRESS
=
$REWARD_ADDRESS
"
rm
-rf
node node.log mydb
echo
"rm data successful"
go get
echo
"go get successful"
go build
-o
powerNode ./cmd
echo
"build successful"
\ No newline at end of file
echo
"Received
$DOCKER_SERVER
=
$DOCKER_SERVER
"
./powerNode
--reward
$REWARD_ADDRESS
--docker_server
$DOCKER_SERVER
echo
"running successfully"
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment