Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LbDocker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
LHCb Core Software
LbDocker
Commits
c89b80bb
Commit
c89b80bb
authored
8 years ago
by
Henry Fredrick Schreiner
Browse files
Options
Downloads
Patches
Plain Diff
removing check for docker group on non-linux systems (mac, for example, does not need it)
parent
ca2fd498
No related branches found
No related tags found
1 merge request
!4
Remove docker group check for non-linux systems
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/lb-docker-run
+10
-8
10 additions, 8 deletions
scripts/lb-docker-run
with
10 additions
and
8 deletions
scripts/lb-docker-run
+
10
−
8
View file @
c89b80bb
...
...
@@ -3,6 +3,7 @@ import os
import
sys
import
pwd
import
grp
import
platform
import
optparse
import
socket
import
threading
...
...
@@ -42,14 +43,15 @@ dockerHome = '/home/' + userName
if
dockerHome
in
cwd
:
dockerHome
=
'
/
'
+
userName
if
grpId
is
not
0
:
try
:
docker_group
=
grp
.
getgrnam
(
'
docker
'
).
gr_gid
except
:
sys
.
exit
(
'
No
"
Docker
"
group found
'
)
else
:
if
userName
not
in
grp
.
getgrnam
(
'
docker
'
).
gr_mem
:
sys
.
exit
(
'
Directory owned by root, you need to be part of the
"
Docker
"
group to run a container
'
)
if
platform
.
system
()
==
"
Linux
"
:
if
grpId
is
not
0
:
try
:
docker_group
=
grp
.
getgrnam
(
'
docker
'
).
gr_gid
except
:
sys
.
exit
(
'
No
"
Docker
"
group found
'
)
else
:
if
userName
not
in
grp
.
getgrnam
(
'
docker
'
).
gr_mem
:
sys
.
exit
(
'
Directory owned by root, you need to be part of the
"
Docker
"
group to run a container
'
)
parser
=
optparse
.
OptionParser
()
parser
.
add_option
(
'
--version
'
,
action
=
'
store_true
'
,
dest
=
'
version
'
,
help
=
"
Print version information and quit
"
)
...
...
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