Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bfanodo
Manage
Activity
Members
Labels
Plan
Issues
0
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
Nelson Lombardo
bfanodo
Commits
6b518007
Commit
6b518007
authored
5 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
Mejorando start.sh
parent
2c705af4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+1
-2
1 addition, 2 deletions
Dockerfile
start.sh
+34
-4
34 additions, 4 deletions
start.sh
with
35 additions
and
6 deletions
Dockerfile
+
1
−
2
View file @
6b518007
...
...
@@ -8,13 +8,12 @@ EXPOSE 8545 8546 30303
ENV
USERNAME=bfa HOME=/home/bfa
ENV
BFAHOME=${HOME}/bfa BFANETWORKIDPROD=47525974938 BFANETWORKIDTEST=55555000000 VIRTUALIZATION=DOCKER
ENV
BFANETWORKDIRPROD=${BFAHOME}/network BFANETWORKDIRTEST=${BFAHOME}/test2network PATH=${BFAHOME}/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN
adduser
-u
30303
-s
/bin/bash
-h
${
HOME
}
-D
${
USERNAME
}
${
USERNAME
}
&&
apk add
--no-cache
git bash jq perl perl-class-accessor perl-json perl-json-xs perl-lwp-protocol-https nodejs npm binutils python3
&&
rm
-f
/var/cache/apk/
*
RUN
adduser
-u
30303
-s
/bin/bash
-h
${
HOME
}
-D
${
USERNAME
}
${
USERNAME
}
&&
apk add
--no-cache
git bash jq perl perl-class-accessor perl-json perl-json-xs perl-lwp-protocol-https nodejs npm binutils python3
curl
&&
rm
-f
/var/cache/apk/
*
USER
${USERNAME}
WORKDIR
${HOME}
RUN
git clone
--quiet
https://gitlab.bfa.ar/blockchain/nucleo.git
${
BFAHOME
}
&&
cd
${
BFAHOME
}
&&
npm
install
--no-optional
&&
npm audit fix
ENV
BFANETWORKID=${BFANETWORKIDPROD} BFANETWORKDIR=${BFANETWORKDIRPROD}
ENV
BFANODEDIR=${BFANETWORKDIR}/node BFATOML=${BFANETWORKDIR}/config.toml
RUN
mkdir
-p
${
BFANODEDIR
}
&&
ln
-s
${
BFANODEDIR
}
.ethereum
RUN
sed
-i
's/^HTTPHost = "127.0.0.1"/HTTPHost = "0.0.0.0"/'
${
BFATOML
}
WORKDIR
${BFAHOME}
VOLUME
[ "/home/bfa" ]
This diff is collapsed.
Click to expand it.
start.sh
+
34
−
4
View file @
6b518007
...
...
@@ -8,8 +8,38 @@ then
exit
1
fi
mkdir
-p
${
HOME
}
/dockers/volumes/bfanodo,home,bfa,bfa,network,node,geth
mounts
=
"-v
${
HOME
}
/dockers/volumes/bfanodo,home,bfa,bfa,network,node,geth:/home/bfa/bfa/network/node/geth"
if
[
"
$1
"
=
"test"
]
then
tag
=
"test"
class
=
"test"
name
=
"bfatestnode"
else
tag
=
"latest"
class
=
"prod"
name
=
"bfanodo"
fi
vd
=
"
${
HOME
}
/dockers/volumes/
${
name
}
,home,bfa,bfa,network,node,geth"
mkdir
-p
"
${
vd
}
"
mounts
=
"-v
${
vd
}
:/home/bfa/bfa/network/node/geth"
if
[
"
$UID
"
=
"0"
]
then
chown
-R
30303:30303
${
vd
}
else
# This is a bit slower, but works
docker run
--rm
$mounts
-u
root alpine
chown
-R
30303:30303 /home/bfa/bfa/network
fi
docker run
--rm
$mounts
-u
root alpine
chown
-R
30303:30303 /home/bfa/bfa/network
docker run
-d
--memory
4g
$mounts
-p
8545:8545
-p
127.0.0.1:8546:8546
-p
30303:30303
--restart
=
unless-stopped
--name
bfanodo rlegene/bfanode
# Run this just a single time.
# Docker itself makes sure it autostarts if it crashes or the server reboots.
docker run
\
--detach
\
--restart
=
unless-stopped
\
--memory
4g
\
$mounts
\
-p
8545:8545
\
-p
8546:8546
\
-p
30303:30303
\
--name
${
name
}
\
rlegene/bfanode:
${
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