Skip to content

How to use odoo:17 image in devcontainer? #508

@mojmirdurik

Description

@mojmirdurik

I am trying to create a devcontainer for the development of custom Odoo modules. This devcontainer is based on the official odoo:17 image. You can see the current state of my devcontainer in my-odoo-project.zip. I would like to ask the following questions:

  • It took me a few days of effort to discover that I needed to add a new user with UID/GID 1000 in the odoo:17 image to make the devcontainer work with this image. See the creation of the developer user in .devcontainer/Dockerfile.fajnodoo17 and the "remoteUser" in .devcontainer/devcontainer.json. Here are my questions:

    • Is creating a user with UID/GID 1000 the only solution, or is there a more straightforward alternative?
    • If user creation is the correct approach, is it possible to pre-create such a devcontainer-friendly user in the Docker image to make it easily usable for a devcontainer creation? Or at least, is it possible to add a section "How to use this image in a devcontainer" in the odoo:17 image overview describing how to extend the image by user creation?
  • How can I map the installed Odoo modules (applications) to my devcontainer? Where are they located in the odoo:17 image?

  • How can I run odoo-bin command in the devcontainer (or Docker container)?

  • Do you have any other recommendations on how to correctly use the odoo:17 image in a devcontainer for development? Would it be possible to include these recommendations in the odoo:17 image overview?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions