Create a context for local builds
This ensures we use the docker-container driver and not whatever the local default is.
This commit is contained in:
committed by
Donal McBreen
parent
ed148628fb
commit
c048c097ed
@@ -1,8 +1,10 @@
|
|||||||
class Kamal::Commands::Builder::Local < Kamal::Commands::Builder::Base
|
class Kamal::Commands::Builder::Local < Kamal::Commands::Builder::Base
|
||||||
def create
|
def create
|
||||||
|
docker :buildx, :create, "--name", builder_name, "--driver=docker-container"
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove
|
def remove
|
||||||
|
docker :buildx, :rm, builder_name
|
||||||
end
|
end
|
||||||
|
|
||||||
def info
|
def info
|
||||||
@@ -20,6 +22,10 @@ class Kamal::Commands::Builder::Local < Kamal::Commands::Builder::Base
|
|||||||
build_context
|
build_context
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def context_hosts
|
||||||
|
docker :buildx, :inspect, builder_name, "> /dev/null"
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def builder_name
|
def builder_name
|
||||||
"kamal-local"
|
"kamal-local"
|
||||||
|
|||||||
Reference in New Issue
Block a user