2 答案
hello,
Yes you can run Odoo in a docker container. When developing in docker I use bind mounts and typically use docker-compose
Please do not take this the wrong way - I’ve been exactly where you‘re at right now with these questions. I would highly recommend you get a general sense of docker and Linux overall if you want to develop.
Developing in Odoo, or any application, requires a tremendous amount of patience when learning. I will give you a direct answer but I highly recommend you learn how to use vscode or pycharm, the docker process and syncing of data.
Here you go:
1) When using docker, I suggest using docker-compose for odoo and your database
2) Use bind mounts so it’s easy to modify your code
3) When starting docker-compose, use
command: odoo -u your_module_name -d your_database_name
So it’s easy to type docker restart odoo
4) when syncing data, pycharm has a built in remote interpreter so you can keep a copy of the files on Windows and a copy on Ubuntu. When editing files in Windows 10, it will change the files on your server at the same time
5) If you do not want to sync that way, you can use NFS to sync but that can come with its own little issues
I really do suggest you get a firm understanding of the basic docker processes, SSH and how to edit/sync files before going further down this road.
I wish you the best of luck