0

I want to setup Docker for Magento 2.

I have gone through number of links but didn't find the solution yet. Can somebody share useful links to do this.

Thanks

0

Here is how I figured it out:

Step 1. Install Docker

https://docs.docker.com/docker-for-mac/install/

Step 2. Clone Docker Image for Magento 2

https://github.com/rhinos-dubai/docker-magento2

or

https://github.com/markshust/docker-magento

or

https://github.com/clean-docker/Magento2 or you can use any other reliable Image.

Step 3. I am considering 1st link for image here. Now from terminal go to the folder YourlocalFolderName/docker-magento2 like

cd YourlocalFolderName/docker-magento2

and run:

docker-compose up -d

Now go to your web container by this command:

docker exec -u 0 -it docker-magento2_web_1 /bin/bash

or

bin/shell

Step 4. Now run:

install-magento

Now type same url in your browser as in env file. Thats it.

If you want to install sample data just run:

install-sampledata

Push vote up if it was useful for you, so that it may ease the coming readers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.