Closed ravenscar closed 1 month ago
Does it not work in 0.0.380
?
nope I tried this in 0.383, I don't think it's an issue with the dockerfile but the .dockerignore
ah i see - the thing is in SST we try to ensure all paths across all resources are relative to the sst.config.ts
for consistency - if you specify it as a relative path eg ../../something
does that work?
the paths are provided by our CI/CD system so I was just hoping it would work. In the end I just perform the build outside of sst so I am closing the issue.
Original issue is here: https://github.com/sst/ion/issues/424 this was closed prematurely without fixing the bug I was experiencing.
if you create a cluster like this:
Where the context/dockerfile paths are absolute, and the Dockerfile is in a subpath of the context then sst deploy fails with:
Docker allows context paths which do not have to be in a sub-directory relative to the dockefile, they can be parent directories or the Dockerfile and context can be separated. A docker context must be absolute if it is not a sub-directory, e.g.
../
is not a valid context.Currently SST assumes the context will be in a relative position to the
$cli.paths.root
, this may not be the same root of the project in all cases, e.g. a monorepo where the modules are hoisted to a parentpackage.json
.Currently it is not possible to deploy a service having a context with an absolute path which is a parent directory of the
sst.config.ts
.