dry-library-47365
07/15/2024, 3:04 PMkubectl cp
or similar) Is there any workaround for this?chilly-gigabyte-83853
07/23/2024, 12:43 PMsh
to be present.
This is not a common use-case in our current user-base, but definitely a valid feature request. It would be great if you could open an issue on GitHub.
Meanwhile, we could think of a workaround.
Would it be feasible for your test case, to use a different base-image just for testing and/or CI?
You could create a multi-stage image and specify via Garden which one to use based on the environment you are in.
Or even specify a different image altogether.
E.g.:
# Select stage based on environment
kind: Build
name: api-dev
type: container
spec:
dockerfile: api.dockerfile
targetStage: ${environment.name === 'dev' ? "dev-stage" : "prod-stage" }
See docs for more info: https://docs.garden.io/reference/template-strings/action-specs#usd-environment.name and
https://docs.garden.io/reference/action-types/build/container#spec.targetstage
I hope this helps in the meantime.