Does anyone know where the `.dockerignore` should ...
# help
r
Does anyone know where the
.dockerignore
should be placed to be picked up by the SST/CDK build of a docker lambda function?
a
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
@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
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"]}),