Impossible to dockerize the Skeleton because of node_modules symlink
Hi,
I would like to use docker in order to develop a Sylius plugin without install everything on my computer but I encountered a lot of troubles with the skeleton due to the fact that docker don't handle symlink for security reasons.
I'm not a docker expert but I tried different things :
- I created the symlink in my Dockerfile
- I copied the node_modules folder in my Dockerfile
- I mounted the node_modules directory
- I used tar
Nothing worked.
So I decided to change the solution : instead of move the node_modules directory at the root level of the plugin, I choice to move the vendor directory of composer in tests/Application. In order to do it just for the test and dev environment I used a composer plugin but I had to use a fork in order to use composer 2...
This works now. I just have to fix the workflow of GitHub Actions but there is 2 downsides :
- The installation is slow, I think my Dockerfile could be optimized
- The fork of composer-merge-plugin forced me to create a github oauth token
So this is not perfect. I can submit a PR if you want to see my progress but my devops skills will not allow me to answer these 2 problems currently.
Woud you be interested in my work or can you direct me to a better solution ?
Thanks
I resolved my downsides by removing composer-merge-plugin and just changing vendor directory location in the composer.json file. So there is no more need to move node_modules directory and the last missing point is the addition of Chrome headless.
May be the docker part could be improve but its works (I initiated it with the docker configuration of sylius standard distribution): https://github.com/FabienSalles/ecard-sylius/pull/1