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

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

Open
CreativeTransmissions opened this issue Feb 6, 2020 · 5 comments

Comments

@CreativeTransmissions
Copy link

CreativeTransmissions commented Feb 6, 2020

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 CreativeTransmissions changed the title Windows 10 - an Docker Still be Used For PHP Containers + Windows 10 - Can Docker Still be Used For Non WordPress Containers? Feb 6, 2020
@akiya64
Copy link

akiya64 commented Feb 9, 2020

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

@CreativeTransmissions
Copy link
Author

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.

@akiya64
Copy link

akiya64 commented Feb 11, 2020

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.

@CreativeTransmissions
Copy link
Author

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?

@akiya64
Copy link

akiya64 commented Feb 21, 2020

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.

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

2 participants