Skip to content
Snippets Groups Projects
Commit da6e6d1000cd authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:sparkles: add option to docker build to avoid pulling image

parent 6d3f7c36a0cc
No related branches found
No related tags found
No related merge requests found
......@@ -24,5 +24,5 @@
_logger = logging.getLogger(__name__)
__version__ = '0.1.1'
__version__ = '0.1.2'
__date__ = '2018-04-04'
......@@ -28,5 +28,5 @@
__date__ = '2018-04-04'
__updated__ = '2018-04-24'
__updated__ = '2018-11-19'
def main(argv=None): # IGNORE:C0111
......@@ -92,6 +92,11 @@
help="add dev feature to generated image [default: %(default)s]",
default=None,
)
parser.add_argument(
'--no-pull',
help="indicate to docker to not pull the base image [default: %(default)s]",
action='store_true',
)
# TODO (maybe) add argument for other build arg
# TODO detect that user is member of docker group
......@@ -174,7 +179,8 @@
# TODO remove temp image
docker_client = docker_api(base_url='unix://var/run/docker.sock')
pull = True
pull = not nmspc.no_pull
logging.debug("Docker Pull %s", pull)
builder = docker_client.build(
path='.', rm=True, pull=pull, buildargs=buildargs,
tag=image, dockerfile=dockerfile)
......
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