Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to dockerize the Skeleton because of node_modules symlink #204

Open
FabienSalles opened this issue Dec 13, 2020 · 1 comment
Open

Comments

@FabienSalles
Copy link

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 :

  1. The installation is slow, I think my Dockerfile could be optimized
  2. 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

@FabienSalles
Copy link
Author

FabienSalles commented Dec 14, 2020

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): FabienSalles/ecard-sylius#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant