From a9be6cc8381a48d2a61dbad788522f8c0e2a1e64 Mon Sep 17 00:00:00 2001 From: Samuel Sieg Date: Thu, 9 Mar 2023 10:12:53 +0100 Subject: [PATCH 1/3] Add builder options for `dockerfile` and `context` to README --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 286a0b6e..23342ec5 100644 --- a/README.md +++ b/README.md @@ -322,6 +322,26 @@ builder: This is also a good option if you're running MRSK from a CI server that shares architecture with the deployment servers. +### Using a different Dockerfile or context when building + +If you need to pass a different Dockerfile or context to the build command (e.g. if you're using a monorepo or you have +different Dockerfiles), you can do so in the builder options: + +```yaml +# Use a different Dockerfile +builder: + dockerfile: Dockerfile.xyz + +# Set context +builder: + context: ".." + +# Set context and Dockerfile +builder: + dockerfile: "../Dockerfile.xyz" # Dockerfile is in the parent directory + context: ".." +``` + ### Using build secrets for new images Some images need a secret passed in during build time, like a GITHUB_TOKEN, to give access to private gem repositories. This can be done by having the secret in ENV, then referencing it in the builder configuration: From 716103590d45af94401c632b6c4296b23553b999 Mon Sep 17 00:00:00 2001 From: Samuel Sieg Date: Thu, 9 Mar 2023 10:14:29 +0100 Subject: [PATCH 2/3] Keep it simple --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 23342ec5..ceb3a4dc 100644 --- a/README.md +++ b/README.md @@ -338,7 +338,7 @@ builder: # Set context and Dockerfile builder: - dockerfile: "../Dockerfile.xyz" # Dockerfile is in the parent directory + dockerfile: "../Dockerfile.xyz" context: ".." ``` From 16896fa8ad635f2176f9556439897ce77fb953d1 Mon Sep 17 00:00:00 2001 From: Samuel Sieg Date: Thu, 9 Mar 2023 10:15:07 +0100 Subject: [PATCH 3/3] :nail_care: --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ceb3a4dc..23aa9f09 100644 --- a/README.md +++ b/README.md @@ -336,7 +336,7 @@ builder: builder: context: ".." -# Set context and Dockerfile +# Set Dockerfile and context builder: dockerfile: "../Dockerfile.xyz" context: ".."