Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bfanodo
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
bfanodo
Commits
1b953436
Commit
1b953436
authored
5 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
Better volume management
parent
6e49214f
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+3
-2
3 additions, 2 deletions
Dockerfile
bfatoolbase/Dockerfile
+2
-2
2 additions, 2 deletions
bfatoolbase/Dockerfile
build.sh
+1
-1
1 addition, 1 deletion
build.sh
start.sh
+4
-24
4 additions, 24 deletions
start.sh
with
10 additions
and
29 deletions
Dockerfile
+
3
−
2
View file @
1b953436
...
...
@@ -11,5 +11,6 @@ ENV BFANODEDIR=${BFANETWORKDIR}/node BFATOML=${BFANETWORKDIR}/config.toml
RUN
mkdir
${
BFANODEDIR
}
&&
ln
-s
${
BFANODEDIR
}
${
HOME
}
/.ethereum
USER
${USERNAME}
WORKDIR
${BFAHOME}
RUN
git checkout
${
GITBRANCH
}
&&
git pull
#VOLUME [ "/home/bfa" ]
RUN
rm
-f
package-lock.json
;
git checkout
${
GITBRANCH
}
&&
git pull
VOLUME
$BFANETWORKDIR/cache
VOLUME
$BFANODEDIR
This diff is collapsed.
Click to expand it.
bfatoolbase/Dockerfile
+
2
−
2
View file @
1b953436
FROM
ethereum/solc:0.
5.10
-alpine
AS
solc
FROM
ethereum/client-go:alltools-v1.9.
2
FROM
ethereum/solc:0.
6.3
-alpine
AS
solc
FROM
ethereum/client-go:alltools-v1.9.
11
LABEL
maintainer="Robert Martin-Legene <robert@nic.ar>"
CMD
[ "/bin/bash" ]
COPY
--from=solc /usr/local/bin/solc /usr/local/bin
...
...
This diff is collapsed.
Click to expand it.
build.sh
+
1
−
1
View file @
1b953436
...
...
@@ -31,7 +31,7 @@ do
;;
esac
done
docker build
--no-cache
-f
${
DOCKERFILENAME
}
-t
bfaar/nodo:
${
TAG
}
.
docker build
-f
${
DOCKERFILENAME
}
-t
bfaar/nodo:
${
TAG
}
.
rm
Dockerfile-
${
TAG
}
if
[
"
$USER
"
=
"robert"
]
then
...
...
This diff is collapsed.
Click to expand it.
start.sh
+
4
−
24
View file @
1b953436
...
...
@@ -25,28 +25,10 @@ else
exit
1
fi
mounts
=
for
guestdir
in
/home/bfa/bfa/
${
netdir
}
/node /home/bfa/bfa/
${
netdir
}
/cache
do
# docker dirs
d_dirs
=
"
${
d_dirs
}
${
guestdir
}
"
# guestdirs
g_dir
=
${
guestdir
//\//,
}
g_dirs
=
"
${
g_dirs
}
${
g_dir
}
"
# hostdirs
h_dir
=
/home/dockers/volumes/
${
name
}${
guestdir
//\//,
}
h_dirs
=
"
${
h_dirs
}
${
h_dir
}
"
mkdir
-p
${
h_dir
}
mounts
=
"
${
mounts
}
-v
${
h_dir
}
:
${
guestdir
}
"
done
mounts
=
"
${
name
}
_node:/home/bfa/bfa/
${
netdir
}
/node
${
name
}
_cache:/home/bfa/bfa/
${
netdir
}
/cache"
ports
=
"-p 8545:8545 -p 8546:8546 -p 30303:30303"
if
[
"
$UID
"
=
"0"
]
then
chown
-R
30303:30303
${
h_dirs
}
else
# This is a bit slower, but works
docker run
--rm
$mounts
-u
root alpine
chown
-R
30303:30303
${
d_dirs
}
fi
docker run
--rm
$mounts
-u
root bfaar/nodo:
${
tag
}
chown
-R
30303:30303 /home/bfa
# Run this just a single time.
# Docker itself makes sure it autostarts if it crashes or the server reboots.
...
...
@@ -55,8 +37,6 @@ docker run \
--restart
=
unless-stopped
\
--memory
4g
\
$mounts
\
-p
8545:8545
\
-p
8546:8546
\
-p
30303:30303
\
$ports
\
--name
${
name
}
\
bfaar/nodo:
${
tag
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment