3
votes

I have set the Odoo docker container in my local machine and I am able to run the Odoo server. But I want to create custom modules. How do I access the Odoo source code inside the container image and make some changes?

1
Mount a volume!Klaus D.
insted of mounting can't i update the odoo code which is there in the odoo image ?Sravan kunnummal.

1 Answers

1
votes

I think you can build a docker image for yourself. If you want to add your module into Odoo image and don't want to mount it in your command line or write it into docker-compose file.

It's mean that you need to create your docker image.

  • Create Dockerfile like this: https://github.com/odoo/docker/tree/master/11.0

  • With this code, you can create directory and mount it into your image.

    RUN mkdir -p /mnt/extra-addons \ && chown -R odoo /mnt/extra-addons VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]

FYI: This is tutorial to create image: https://docs.docker.com/develop/develop-images/baseimages/

Hope it will help you.