Capacitor sync ios from within a docker container- possible?

I do a lot of development within Docker containers- specifically using VSCode Remote Containers, to keep a consistent development environment across machines. When building an iOS native app, obviously the final build must be done within XCode, however, I was hopeful that everything up until that point could be done within a container with a mounted volume. While building/serving up my ionic code works perfectly fine within the container, I am running into an issue when I try to run capacitor sync ios from within the container. Specifically, I get the following:

x Updating iOS native dependencies with pod install - failed!
x update ios - failed!
[error] ERR_SUBPROCESS_COMMAND_NOT_FOUND

so it appears that pod is not being found by the capacitor CLI process. However, if I manually execute (again from within the container):

cd ios/App; pod install

cocoapods properly runs, and I see Pod installation complete! There are 6 dependencies from the Podfile and 6 total pods installed.

Any thoughts on what may be going on here? Am I correct in assuming that the capacitor cli tool cannot find the pod binary for some reason?

Figured it out. The problem was in how VSCode sets up the user in the docker container. I had set the container up to have a node user as the default user when you exec into the container. This seemed to be causing the issue. To fix it, I commented out the "remoteUser": "node" setting in the devcontainer.json file, so when I was running in the container, I was running as root. I then needed to set the environment variable COCOAPODS_ALLOW_ROOT=True which allows cocoapods to run correctly. Now within the container I can do everything with the exception of the xcodebuild clean step.