31 lines
661 B
Plaintext
31 lines
661 B
Plaintext
|
load("@this//:environment.star", "environment")
|
||
|
def buildDockerFolder(
|
||
|
dockerFile,
|
||
|
image,
|
||
|
tag,
|
||
|
folder,
|
||
|
):
|
||
|
return {
|
||
|
"name": "build-{tag}".format(
|
||
|
tag = tag,
|
||
|
),
|
||
|
"image": "docker:dind",
|
||
|
"volumes": [
|
||
|
{
|
||
|
"name": "dockersock",
|
||
|
"path": "/var/run",
|
||
|
},
|
||
|
],
|
||
|
"environment": environment([
|
||
|
"local-docker-registry",
|
||
|
]),
|
||
|
"commands": [
|
||
|
"cd {folder}".format(folder=folder),
|
||
|
"sh build-docker-folder.sh {dockerFile} $${{LOCAL_DOCKER_REGISTRY}}{image} $${{LOCAL_DOCKER_REGISTRY}}{tag}".format(
|
||
|
image = image,
|
||
|
dockerFile = dockerFile,
|
||
|
tag = tag,
|
||
|
),
|
||
|
],
|
||
|
}
|