Allow for fully native builds too

Skipping multiarch if there's a platform match between dev and prod.
This commit is contained in:
David Heinemeier Hansson
2023-01-13 09:31:47 +01:00
parent 05f1ef5ee8
commit 6ccb3d2319
6 changed files with 129 additions and 56 deletions

View File

@@ -0,0 +1,19 @@
require "mrsk/commands/base"
class Mrsk::Commands::Builder::Multiarch < Mrsk::Commands::Base
def create
docker :buildx, :create, "--use", "--name", "mrsk"
end
def remove
docker :buildx, :rm, "mrsk"
end
def push
docker :buildx, :build, "--push", "--platform linux/amd64,linux/arm64", "-t", config.absolute_image, "."
end
def pull
docker :pull, config.absolute_image
end
end