Add new argument for networks filtering
This commit is contained in:
parent
5534240895
commit
a0201dc21a
|
|
@ -6,6 +6,3 @@ WORKDIR /hoster
|
|||
ADD hoster.py /hoster/
|
||||
|
||||
CMD ["python3", "-u", "hoster.py"]
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -127,8 +127,9 @@ def update_hosts_file():
|
|||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Synchronize running docker container IPs with host /etc/hosts file.')
|
||||
parser.add_argument('socket', type=str, nargs="?", default="tmp/docker.sock", help='The docker socket to listen for docker events.')
|
||||
parser.add_argument('socket', type=str, nargs="?", default="/tmp/docker.sock", help='The docker socket to listen for docker events.')
|
||||
parser.add_argument('file', type=str, nargs="?", default="/tmp/hosts", help='The /etc/hosts file to sync the containers with.')
|
||||
parser.add_argument('--networks', type=str, nargs="*", default=None, help='Manage aliases only for this docker network name.')
|
||||
return parser.parse_args()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Reference in New Issue