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
97ca4a7d
Commit
97ca4a7d
authored
3 years ago
by
1nv1
Browse files
Options
Downloads
Patches
Plain Diff
Added the detection of docker or podman to start the node
parent
9d617104
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
start.sh
+27
-14
27 additions, 14 deletions
start.sh
with
27 additions
and
14 deletions
start.sh
+
27
−
14
View file @
97ca4a7d
#!/bin/bash
#!/bin/bash
trap
'exit 1'
ERR
trap
'exit 1'
ERR
flag_exit
=
0
res
=
'fail'
cmd
=
''
if
!
which docker
>
/dev/null 2>&1
detect_cmd
()
then
{
echo
'Can not find Docker. Make sure it is installed.'
>
&2
if
which
$1
>
/dev/null 2>&1
;
then
cmd
=
$1
res
=
'success'
fi
}
detect_cmd
'podman'
detect_cmd
'docker'
if
[[
$res
=
'fail'
]]
;
then
echo
'Can not find any command to create containers (podman or docker).'
>
&2
exit
1
exit
1
fi
fi
...
@@ -24,14 +37,14 @@ else
...
@@ -24,14 +37,14 @@ else
fi
fi
# Run this just a single time.
# Run this just a single time.
#
Docker
itself makes sure it autostarts if it crashes or the server reboots.
#
Command
itself makes sure it autostarts if it crashes or the server reboots.
docker
run
\
$cmd
run
\
--detach
\
--detach
\
--restart
=
unless-stopped
\
--restart
=
unless-stopped
\
--memory
4g
\
--memory
4g
\
$mounts
\
$mounts
\
-p
8545:8545
\
-p
8545:8545
\
-p
8546:8546
\
-p
8546:8546
\
-p
30303:30303
\
-p
30303:30303
\
--name
${
name
}
\
--name
${
name
}
\
bfaar/nodo:
${
tag
}
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