wocker icon indicating copy to clipboard operation
wocker copied to clipboard

Windows 10 - Can Docker Still be Used For Non WordPress Containers?

Open CreativeTransmissions opened this issue 4 years ago • 5 comments

Hi there,

I'm considering moving from VVV to Wocker but also need to run a standard Nginx container for a different project.

Can these run on the same machine without having to dual boot etc.

I understand turning on Hyper-V will cause a problem with VVV so was wondering if it will also be a problem with Wocker.

CreativeTransmissions avatar Feb 06 '20 10:02 CreativeTransmissions

Hi, Im using Wocker in Windows 10 Pro and VirtualBox 6.0.10. My Windows settings...

  • Hyper-V : OFF
  • WindowsHypervisor Platform: OFF

I see Control Panel -> Windows Feature.

Wocker container include PHP+nginx+MariaDB, different from standard docker policy. And Wocker can switch nginx or apache for each container. https://wocker.dev/tips/#h2-0

akiya64 avatar Feb 09 '20 04:02 akiya64

Thanks that sounds promising. I'm going to need to use docker for WordPress development and Laravel development on the same laptop so I can quickly switch between projects.

CreativeTransmissions avatar Feb 10 '20 08:02 CreativeTransmissions

need to use docker for WordPress development and Laravel development

I undestood you have to use some containers, at least 2 containers.

Wocker run container on "Barge" OS that booted by Vagrant via VirtualBox. On Barge, it is possible to run any Docker command. So, it is possible to run other image container on Barge.

But, network settings is in Wocker Vagrant file. Does not use URL other than http://wocker.test/.

Other way you can use only Wocker image it is hosted Docker Hub. Need to setup Docker Desktop on Windows and use docker command. Then it may be helpful wocker-cli flie.

akiya64 avatar Feb 11 '20 06:02 akiya64

Hi there,

Thank you for the additional info. I now have Wocker running in Windows 10 and it works great.

I am now going to install Docker Desktop on windows for my Laravel project.

I have read that for Docker Deskop to work, I have to enable Hyper-V.

Could you please advise if Wocker will still work on the same way with Hyper-V enabled?

CreativeTransmissions avatar Feb 13 '20 11:02 CreativeTransmissions

You have completed setup Docker Desktop, right? So I think better to run Wocker container using Docker Desktop for Windows without Vagrant & VirtualBox.

In Powershell, for example container name my-wocker

  1. cd ~/
  2. docker pull wocker/wocker:latest
  3. docker run -d --name my-wocker wocker/wocker
  4. docker cp my-wocker:/var/www/wordpress ./my-wocker    Copy WordPress core php files from container to my-wocker folder in your home dir.    Example my Windows, docker copy to C:/users/akiya/my-wocker/
  5. docker rm -f my-wocker
  6. docker run -d --name my-wocker -p 80:80 -p 3306:3306 -p 8025:8025 -v ~/my-wocker:/var/www/wordpress:rw wocker/wocker
  7. docker exec -u wocker -it my-wocker wp search-replace wocker.test localhost
  8. Access http://localhost you see initial wordpress page.

Stop container docker stop my-wocker. Once WordPress is displayed, docker stop my-wocker or docker start my-wocker.

Setup another name containers and folders, you have multiple WordPress environment. In the same way, you can have Wocker container and Laravel container.

akiya64 avatar Feb 21 '20 22:02 akiya64