Open royassis opened 1 month ago
Hi @royassis thanks for raising the issue. Looking at docker's doc, it seems you need to pass in the secrets. i.e. if you run docker build
, you need to supply the --secret
flag. However, sam build
does not support --secret
at the moment. Marking it as a feature request. I'll bring this up with team to prioritize it.
Thanks @hawflau
Actually I am also using the --build-context
flag in some of my images.
Would be nice if this can also be added to the feature request, or even an option to pass a custom string to the docker build
command.
I work around this by buliding and distributing my image lambdas on my own, and then I use sam
to deploy the IaC (and other things like generating events for testing, etc.)
@JonZeolla the issue is when I try to debug with the AWS Toolkit plugin it auto builds the image and then fails
Description:
My goal is to build my images outside sam and use sam only for debugging using the AWS Toolkit in Pycharm. When running the AWS Toolkit debug configuration in Pycharm the
sam build
command is ran and fails.Whenever I use a
RUN --mount=type=secret
in my Dockerfile I get the build error.This is the error:
This is the part from the Dockerfile:
If I remove this part from the Dockerfile the error is solved.
Regardess of sam, I get the same error when I remove this line from my Dockerfile:
Observed result:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 1.115.0