Allow setting the build context used for building

This commit is contained in:
Samuel Sieg
2023-03-04 10:59:52 +01:00
parent b6934b0f41
commit ff88ee0b22
5 changed files with 17 additions and 3 deletions

View File

@@ -12,6 +12,9 @@ class Mrsk::Commands::Builder::Base < Mrsk::Commands::Base
def build_options
[ *build_tags, *build_labels, *build_args, *build_secrets, *build_dockerfile ]
end
def build_context
context
end
private
@@ -46,4 +49,8 @@ class Mrsk::Commands::Builder::Base < Mrsk::Commands::Base
def dockerfile
(config.builder && config.builder["dockerfile"]) || "Dockerfile"
end
def context
(config.builder && config.builder["context"]) || "."
end
end