odoo / odoo/docker

How to use odoo:17 image in devcontainer?

Open
#508 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
1.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .devcontainer/Dockerfile.fajnodoo17 and .devcontainer/devcontainer.json, then compare them with the odoo:17 image overview. Investigate the image's user setup, installed module locations, and how odoo-bin is invoked. Done means documenting verified devcontainer usage and recommendations in the odoo:17 image overview.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, dockerfile
Domain
devops, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.