Skip to content
Snippets Groups Projects
Commit c89b80bb authored by Henry Fredrick Schreiner's avatar Henry Fredrick Schreiner
Browse files

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!4Remove docker group check for non-linux systems
......@@ -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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment