Answer the question
In order to leave comments, you need to log in
How do you use docker for development on Windows?
At the moment I'm using docker through virualbox with disabled folder sharing.
Now, to upload changes to the container, I use a script that essentially does:
- docker-compose up
- docker cp
- docker exec ... chown
The last two commands take 15-40 seconds.
Perhaps there are other more correct ways to deploy code to a container?
PS I do not use Shared folders. with them, a pure symfony application runs in 2-6 seconds.
Answer the question
In order to leave comments, you need to log in
So, I found not the most elegant solution, but quite working:
ed. It turns out not quite working.
After restarting the virtual machine, it is necessary to unload all the project files again, while fixing the access rights to /c/Users in advance.
I leave it here for now, maybe someone will have ideas
1. Disable shared folders in the virtual machine settings.
2. Enable sftp for the virtual machine:
# Открываем машину в virtualbox и редактирем конфиг ssh сервера
vi /usr/local/etc/ssh/sshd_config
# и добавить строку
Subsytem sftp internal-sftp
# для тех, кто не работал в vi
# сначала жмем i
# затем добавляем нужную строку
# жмем ESC, жмем :
# вводим (внизу слева) wq жмем enter
mkdir -p /c/Users
chown 0777 /c/Users -R
you can mount a directory between the docker and the virtual machine, there should not be any serious performance loss. At the expense of shared directories - it really should be disabled.
No way. What I didn’t try to do, it’s impossible to work normally with a virtual machine with symphony under Windows. I spat, and put Debian to work.
Why are you using Disabled Sharding? It’s more convenient to turn on the shared folder and you don’t have to upload the code anywhere.
This is a longstanding problem in virtualbox. When a folder is accessed, it freezes. I have been observing this garbage since the third version, although it used to be much more pronounced.
I don’t know how you create a virtual machine, I use “vagrant” for this, you can use rsync instead of sharedfolder ( here ), but I don’t know if it does synchronization only at startup or every time the contents of the folder change.
You can also stupidly mount the ball from Windows to the virtual machine through "cifs"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question