Looks like sail needs to be published to get devcontainer to properly work
Trouble with Sail Devcontainer after setup
I'm having an issue replicating my devcontainer after initial setup.
I'm learning how to use devcontainers with VS Code. I've set up a Laravel application using the devcontainer instructions detailed in the Laravel installation docs, "choosing your sail services" section. This works when I set it up - everything works smoothly. However, committing it to GitHub and installing it elsewhere (as devcontainers are designed to do) leaves me stuck.
I think the right way to install a devcontainer for VSCode is to use the "Clone repository into container volume" menu option given by the Dev Containers extension. This works fine for other devcontainers I've set up using other lanugages like Node. However, trying to set up this Sail devcontainer errors - it can't find the Sail Dockerfile referenced in the docker-compose.yml file, because composer install hasn't been run, so there's no vendor folder. This isn't an issue in initial setup because a temporary Docker container is spun up based on the laravelsail/php82-composer image to set up the Laravel application + sail.
I understand that I could instead clone the repository locally, composer install and then open the dev container like that, but surely that negates the usefulness of devcontainers - I'll have to install php + extensions + composer which takes forever when they're in the Sail image already?
Am I misunderstanding how devcontainers work, is there some "pre-install" step I'm missing, or is the Sail devcontainer just not designed to work like other devcontainers?
Thanks in advance
Please or to participate in this conversation.