Replies: 2 comments
-
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.
Uh oh!
There was an error while loading. Please reload this page.
-
We currently use Kamal to continuously deploy an application to two destinations: staging and production.
We do this by using
kamal deploy -d staging
andkamal deploy -d production
in a CI workflow but this causes the same Docker image to be built twice: once for each destination even though the resulting images are identical (as there are no per-environment build secrets).Is there a recommended way to build an image once but then deploy it to separate destinations given that
kamal deploy -d
will tag images with their destination (e.g.latest-staging
) or does it only really support building and tagging images per destination?Beta Was this translation helpful? Give feedback.
All reactions