https://serverless-stack.com/ logo
#help
Title
# help
r

Rob N

05/03/2022, 2:58 PM
Does anyone know where the
.dockerignore
should be placed to be picked up by the SST/CDK build of a docker lambda function?
a

Arpad

05/03/2022, 3:49 PM
I think in your working directory. You can try logging
process.cwd()
when running
sst build
and see what you get and try putting the file there
f

Frank

05/04/2022, 5:29 PM
@Rob N r u doing something like this as described here?
Copy code
new lambda.DockerImageFunction(this, 'AssetFunction', {
  code: lambda.DockerImageCode.fromImageAsset(path.join(__dirname, 'docker-handler')),
});
Can it go into the
docker-handler
folder in this case?
r

Rob N

05/04/2022, 6:20 PM
I tried it in every folder and couldnt get it to be picked up
I did however get the
exclude
option to work
Copy code
code: lambda.DockerImageCode.fromImageAsset("../", { file :"xxx/Dockerfile", exclude: ["cdk*", "xxx/.sst", "xxx/.build"]}),
5 Views