empty Dockerfile
This commit is contained in:
parent
0b2254336c
commit
82e2cc3167
@ -131,14 +131,19 @@ build(){
|
||||
|
||||
platform=$(yq e ".services.$service.platform" "$file")
|
||||
image=$(yq e ".services.$service.image" "$file")
|
||||
build=$(yq e ".services.$service.build" "$file")
|
||||
context=$(yq e ".services.$service.build.context" "$file")
|
||||
dockerfile=$(yq e ".services.$service.build.dockerfile" "$file")
|
||||
# Replace '/' and ':' with '-' in the platform string to make it suitable for a tag
|
||||
platform_tag=$(echo "$platform" | tr '/:' '-')
|
||||
# Append platform information to the image tag
|
||||
new_image_tag="${image}-${platform_tag}"
|
||||
|
||||
$engine buildx build --platform $platform -t $new_image_tag -f $context/$dockerfile $context
|
||||
|
||||
# If dockerfile is null or empty, set it to "Dockerfile"
|
||||
if [ -z "$dockerfile" ]; then
|
||||
dockerfile="Dockerfile"
|
||||
fi
|
||||
$engine buildx build --platform $platform -t $new_image_tag -f $context$dockerfile $context
|
||||
done
|
||||
}
|
||||
#push(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user