I finally was able to finish installing M2 enterprise cloud on docker for local dev, and the one final step is to install grunt so I can do some frontend work. I've been trying to wrap my head around how to go about this, but am a bit lost. I've installed grunt before with a sample, non-docker magento install, but since the docker images have the bare minimum necessary for each image I'm not sure how to do this exactly. Node and npm are not available on my php-fpm, and neither is apt-add-repository. Would I have to rebuild the entire project to install node on it during the ./vendor/bin/ece-docker build:compose --mode="developer" --sync-engine="native" --php 7.2 --db 10.2 part, then follow steps like this?

$ sudo npm install -g grunt-cli

I have a feeling that the above isn't the proper way to do this on docker. I've seen some comments about magento having grunt support built in, but wasn't able to find enough about this to really be useful. Hopefully someone with more experience in this can chime in and point me in the right direction. Thanks!

Oh and I'm running 2.3.4 on Ubuntu 18.04 with php7.2 + mariadb 10.2 and am using docker-compose

Here are the containers I'm running: enter image description here

  • Did you ever get this working? I am looking to do the same thing. Have an example docker-compose file?
    – sudopratt
    Aug 4, 2020 at 20:07
  • I ended up putting this to the side for now, but I'll definitely keep this updated if I end up making progress. I'd be happy to share the docker-compose file though: pastebin.com/YB2NxS0S Aug 5, 2020 at 21:03


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.