-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Improve/update Windows docker compose setup #100
Comments
sorry, i have windows versions but don't really support windows. you might want to ask your questino on stackoverflow.com. my only guess is you are missing a directory named |
I went through the steps, so just so i understand is that bin/copymagento is taking the magento source and copying it to the container? Thanks for your help I appreciate you getting back to me |
sounds like it would be missing on the host (your computer). so you probably need to unzip magento to your local |
I unzipped it to my src folder. My error seems to be on the /src/ after the cp -r i believe. Should there also be the $PWD before as it is after the -v ? Thanks again, I appreciate it. |
I am also facing the same issue: |
I'm reopening this ticket (I actually don't know why I closed it in the first place). the windows configuration needs some updates, there have been a lot of updates to this repo and windows really wasn't factored in. @zsoerenm did the initial windows config. not sure if you can help at all? 😋 |
Yes in commit 7bdd466#diff-9b7421fc1fe30ba6845586284d35a9fe |
I wonder if the windows version is still functional. I had to copy the whole magento folder into the container because of permission problems when mounting the whole folder into the container. |
I merged this PR but this issue shouldn't have been closed. Thank you @zsoerenm for the PR. The windows version definitely needs some work, so going to keep this ticket open to work on the windows docker compose setup. I don't have a Windows machine to test on, but would love to take a PR to fix it up so we can fully support it again. |
i pinned this post on github to try to get it more attention. |
I am sorry that I did not have a look into this. |
@zsoerenm cool, by the looks of it we came to the same resolution for performance :) yes very performant now. i'm not super fond of how i implemented the bin helper scripts either, however i found it to be the best interim solution until we can figure out a better way so user's wouldn't need to understand all of the docker commands. i'll check out your repo for inspiration if i can for backporting windows support again. i also made a few steps towards making it compatible with unified dev/prod environments, needs a bit more work though. awesome job, i think we can all learn from each other. |
did you create a enviroment variable for 7z ? |
Hey @markshust, this is such an awesome repo and just missing Windows support (We have a few developers using Windows) and @zsoerenm seems to have done some great work here. Instead of us having so many forks of magento2-docker why don't you guys work together and make beautiful babies? ;) |
@markojak really really appreciate your donation 👍 totally awesome i would love to collab with @zsoerenm and try to get windows support back in here. i haven't taken a look at this issue in a while since the demand quite hasn't been there, and i'm working on some educational material right now that i believe is more important. that said, i would love a PR to get all of the scripts working for windows. fyi it was working at one time, the scripts are still up at https://github.com/markshust/docker-magento/tree/master/compose/magento-2-windows/bin -- i know @df2k2 is also a huge powershell guy so maybe he can chime in 😉 i'm so far disconnected from windows, i don't think i would be of much help here and i really don't want to go down that rabbit hole again unfortunately. but would love the current bin helper scripts at https://github.com/markshust/docker-magento/tree/master/compose/magento-2/bin backported to powershell. once they are fully backported i can most likely maintain all of it. |
I took a different approach: Shell scripts often depend on the operating system. That's why I reduced the number of scripts down to zero. IMHO, to get Magento up and running should be as easy as |
@markshust - I've shared this repo with my colleagues as well and encouraged them to sponsor as well. How do either of you deal with the slow speeds? |
@markojak have you tried out this setup on a mac? i blogged about docker performance for mac at https://markshust.com/2018/12/30/docker-mac-filesystem-volume-mount-approach-performance/ -- mainly comes down to using delegated volumes, and not syncing over entire folder structures. magento filesystem is the biggest baddest beast out there in php land, and pretty sure i hit every issue so far with it. that said, i use this setup daily and develop on it, and don't have any performance issues at all. docker-sync and the like are dead/deprecated in my head with the release of delegated volumes... i think the last time i used that was 3 years ago 😄 |
@zsoerenm i don't plan on getting rid of the helper scripts anytime soon, if anything i'll abstract them out even more. newbs don't know docker, nor should they need to know it. i'm trying to take more of a simpleton approach of abstracting docker away to the background. at the end of the day i don't want users to even know they are using docker. |
thanks for the call out @markshust. I’d be happy to get involved here to see what o can do help. I have had a few ideas lately. |
you can test docker by docker-pull hello-world and docker run hello-world. dont forget to install docker-compose |
Oh forgot to mention to to reload the bash file you need to run source ~/.bash_profile and source ~/.bashrc |
~/.bashrc |
Above issue fixed but |
You have docker installed on your windows? The docker status will keep reporting as not running since wsl canot check the status of a windows service. You çan test if docker is working by docker-composé up or run hello-world. |
Hello, i am working on window home edition so docker into window does not work does possible to direct install into window ubnuntu and check it same like directly we do into linux |
Indeed hyper v does not work on home edition only on pro. You çan indeed install virtual box and play with docker on vbox. Or you can install Linux native |
i will give wsl 2 a try i will post the end result |
i have upgraded wsl to v 2 and the image builds as expected. |
Is that possible without docker in window? |
you can install docker without windows on linux or mac, if you want docker with integration on WSL you need to have docker on the host machine and inside the wsl instance |
is not possible just install docker into WSL and somehow allow tcp with the port with window machine without docker into the window. |
FYI support for Windows-specific helper scripts has been dropped b23f44e I'll keep this ticket open until Windows installation on WSL is documented. |
The steps that need to be followed are.
After this you should be able to run docker notice wsl can't give you the status of the docker service to check for errors run docker - - version if this does not result in a error your Docker instance is working. And follow the Linux steps in this repo. |
Hi @markshust ! Thanks for the nice repository that you have built! As you said creating the environment on wsl2 was pretty straight forward (same as linux), but I need some help connecting to the server via browser. The problem seems to be from the wsl2 where, even though i added the entry on both host files (wsl2 and windows), i am unable to connect to it as the hosts seem to not be communicating. I have had these problems before with docker and wsl2, and the only workaround that actually worked for me is just accessing it via localhost and the port exposed in php for example. I couldn't do this now and i was wondering if you have any idea, suggestion, workaround that could help me. Thanks again! |
Getting below error |
Using WSL 2 with Ubuntu stuck at Extracting magento2-2.3.0.tar.gz to ./src This may help to speed up composer install.
|
Does anyone have any good tutorials for getting M2 up and running on WSL 2? |
I haven't attempted it again yet, but have done some other projects that are not Magento 2. Instead you can goto this in explorer can map it as a network drive and edit within it. Should only really have a volume for the app and a few other folders for persistence (media/static?) When you open a Ubuntu terminal you can then do the docker-compose up and still have mounted volumes. Maybe have the DB server just running on the host. |
A lot has changed with Windows, WSL2, and Docker since I last tried this process (for the better). I started a discussion at #372 and I'm at the last step to get SSL working. I should have working documentation soon 😄 |
Has anyone subscribed to this ticket figured out SSL, in regards to getting it working with WSL2/Ubuntu 20? |
If you are using Firefox and it warns you the SSL certificate is invalid/untrusted, go to Preferences -> Privacy & Security -> View Certificates (bottom of page) -> Authorities -> Import and select ca.cert.pem for import, then reload the page. If you are using Chrome on Linux and it warns you the SSL certificate is invalid/untrusted, go to Chrome Settings -> Privacy And Security -> Manage Certificates (see more) -> Authorities -> Import and select ca.cert.pem for import, then reload the page. |
Thanks @df2k2. I'd like to find an automated solution also if possible? |
Thanks @df2k2, I'll use this for the initial documentation. And I have great news! I have confirmed the instructions at #372 are indeed working, and have replicated on install of Magento 2 on Windows using WSL 2 and Ubuntu. I'll be writing up some formal documentation so we can finnnnnnally close out this ticket. Performance is great. |
Where abouts do I get hold of ca.cert.pem ? Installing this on WSL2 has been a real headbanger so far but im nearly there ! |
@markshust Mark have you had a chance to write up this documentation yet? |
I am on windows, I am working on going through this repo to install magento.
I get to the bin/copymagento, after it does all the pulls i get this error
cp: cannot stat '/src/.': No such file or directory
Not sure where I went wrong.
Thank you!
Best
The text was updated successfully, but these errors were encountered: