load("@this//:environment.star", "environment") def build(name): return { "name": "build-{name}".format(name=name), "image": "docker:stable-dind", "volumes": [ { "name": "dockersock", "path": "/var/run", }, ], "environment": environment([ "local-docker-registry", "registry-password" ]), "commands": [ "cd {name}".format(name=name), 'docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${REGISTRY_PASSWORD}"', "docker build . -t $${{LOCAL_DOCKER_REGISTRY}}{name}".format(name=name), "docker push $${{LOCAL_DOCKER_REGISTRY}}{name}".format(name=name), ], }