Namespace buildx and contexts

To prevent clashes on remote builders
This commit is contained in:
David Heinemeier Hansson
2023-01-13 17:29:53 +01:00
parent 5179d0db37
commit bf98a0308c
2 changed files with 16 additions and 6 deletions

View File

@@ -2,11 +2,11 @@ require "mrsk/commands/base"
class Mrsk::Commands::Builder::Multiarch < Mrsk::Commands::Base
def create
docker :buildx, :create, "--use", "--name", "mrsk"
docker :buildx, :create, "--use", "--name", builder_name
end
def remove
docker :buildx, :rm, "mrsk"
docker :buildx, :rm, builder_name
end
def push
@@ -22,4 +22,9 @@ class Mrsk::Commands::Builder::Multiarch < Mrsk::Commands::Base
docker(:context, :ls),
docker(:buildx, :ls)
end
private
def builder_name
"mrsk-#{config.service}"
end
end