mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-06-18 05:12:21 +00:00
This was originally proposed here by @grinderz: https://github.com/overhangio/tutor/pull/355
22 lines
483 B
Python
22 lines
483 B
Python
from . import fmt
|
|
from . import utils
|
|
|
|
|
|
def get_tag(config, name):
|
|
return config["DOCKER_IMAGE_" + name.upper().replace("-", "_")]
|
|
|
|
|
|
def build(path, tag, *args):
|
|
fmt.echo_info("Building image {}".format(tag))
|
|
utils.docker("build", "-t", tag, *args, path)
|
|
|
|
|
|
def pull(tag):
|
|
fmt.echo_info("Pulling image {}".format(tag))
|
|
utils.execute("docker", "pull", tag)
|
|
|
|
|
|
def push(tag):
|
|
fmt.echo_info("Pushing image {}".format(tag))
|
|
utils.execute("docker", "push", tag)
|