سؤال

I am new to Docker technology,I am trying to create a shell script on my host to clear caches and to deploy my static content in Magento 2 inside my apach containe. to access to my apach container i use this command :

docker-compose exec --user www-data apache bash

and i created my script shell in the my project root on my host. my question is how can i run my shell script outside my apache container to execute this command:

bin/magento setup:static-content:deploy

Thanks in advance.

هل كانت مفيدة؟

المحلول

docker exec -it CONTAINER_NAME php /var/www/html/bin/magento setup:static-content:deploy -f

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top