Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cdk-assets): Docker Build Bad Context Path
Prior v1.29.0, the context passed to the docker build command was always the current working directory. In v1.29.0, this was changed to be the directory the user passed when instantiating the asset. However, docker doesn't respect the context passed to the build command when the `--file` argument is also passed. This broke assets for users passing the `file` prop when constructing a `DockerImageAsset`. This is fixed by changing the current working directory of the `docker build` command and passing that context as '.'. Then docker uses the current working directory as the context and correctly finds the image definition file from the `file` prop. An existing integration test in the framework covers this case, but does not fail unless the stack is deployed fresh since the asset isn't rebuilt when the hash is not changed. Fix: #6954 #6814
- Loading branch information