File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 4343 MODULE_NAME :
4444 sh : ' cat "{{.ROOT_DIR2}}/go.mod" | grep "module " | sed "s/module //" | sed -E "s/[[:blank:]].*//"'
4545 NESTED_MODULES : ' {{.NESTED_MODULES | default "" }}'
46+ DOCKERFILE : ' {{.TASKFILE_DIR2}}/Dockerfile'
4647
4748 LOCALBIN : ' {{ env "LOCALBIN" | default ( .LOCALBIN | default (print .ROOT_DIR2 "/bin") ) }}'
4849 LOCALTMP : ' {{ env "LOCALTMP" | default ( .LOCALTMP | default (print .ROOT_DIR2 "/tmp") ) }}'
Original file line number Diff line number Diff line change @@ -82,10 +82,11 @@ tasks:
8282 - ARCH
8383 - IMAGE_BASE
8484 - DOCKER_BUILDER_NAME
85+ - DOCKERFILE
8586 cmds :
8687 - ' echo "Building image {{.COMPONENT}}:{{.VERSION}}-{{.OS}}-{{.ARCH}}"'
8788 - ' [[ "{{.OS}}" == "linux" ]] || { echo "The distroless base image does only support linux as operating system."; exit 1; }'
88- - ' cat "{{.TASKFILE_DIR2}}/Dockerfile " | sed "s/<component>/{{.COMPONENT}}/g" > "{{.ROOT_DIR2}}/Dockerfile.tmp"'
89+ - ' cat "{{.DOCKERFILE}} " | sed "s/<component>/{{.COMPONENT}}/g" > "{{.ROOT_DIR2}}/Dockerfile.tmp"'
8990 - ' ( cd "{{.ROOT_DIR2}}"; docker buildx build --builder {{.DOCKER_BUILDER_NAME}} --load --build-arg COMPONENT={{.COMPONENT}} --platform {{.OS}}/{{.ARCH}} -t {{.IMAGE_BASE}}/{{.COMPONENT}}:{{.VERSION}}-{{.OS}}-{{.ARCH}} -f Dockerfile.tmp . )'
9091 - ' rm -f "{{.ROOT_DIR2}}/Dockerfile.tmp"'
9192 internal : true
You can’t perform that action at this time.
0 commit comments