Building one image to deploy to multiple destinations #1572
-
We currently use Kamal to continuously deploy an application to two destinations: staging and production. We do this by using Is there a recommended way to build an image once but then deploy it to separate destinations given that |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Accordingly to the doc (https://kamal-deploy.org/docs/configuration/builders/) kamal uses the docker build system. I would recommend to download the built image (in staging) to rebuild the production image, with the build-cache (https://kamal-deploy.org/docs/configuration/builders/#builder-cache) you would get this build performed almost instantaneously. TLDR; docker has built-in solution for your problem with a build cache mechanism. |
Beta Was this translation helpful? Give feedback.
-
We're doing exactly that: build one image for staging deploy, and then reuse this image for production deploy. You can deploy existing docker image via |
Beta Was this translation helpful? Give feedback.
We're doing exactly that: build one image for staging deploy, and then reuse this image for production deploy.
You can deploy existing docker image via
kamal deploy --skip-push
. It will not build the image but will try to fetch already built one.