Closed softprops closed 4 months ago
I traced this all the way back to this line https://github.com/dherault/serverless-offline/blob/7485bf303ff55d2ac2a4433504c87edcf8a4783b/src/lambda/LambdaFunction.js#L93
this might be related https://github.com/nodejs/node/issues/11422 docker for mac by default allows /tmp
and /private
paths I tried adding /var
but still got a mount permissions error presumable related to this being a symlink path and not a real path
fs.realpathSync
may be of use here this resolves the symlink to a real path which docker for mac may have a better time coping with
Looks like something for offline support was merged! 🎉
Should this be working now? @softprops @ozbe
Bug Report
Current Behavior
serverless offline --useDocker
seems to mount code from a directory that is not mountable on osxSample Code
your default example below should reproduce the issue though any http handler will do. This has less to do with a handler than it does volume mounting
Expected behavior/code
Environment
serverless
version: v1.74.1serverless-offline
version: v6.4.0node.js
v14.2.0OS
: macOS 10.15.4Possible Solution
volume mount the serverless directory within the repository or somewhere that's accessible for volume mounting on docker for mac
from the docs
It would be nice if
serverless offline --useDocker
worked on a mac out of the boxAdditional context/Screenshots