openwisp / openwisp/docker-openwisp

[change] Make image owner configurable in docker-compose

Open
#565 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docker enhancement
Dominant language
Python
Stars
209
Forks
125
Avg merge
1d 4h
Merged PRs (30d)
24

Description

Is your feature request related to a problem? Please describe.
Currently, the user/owner for the Docker image is hardcoded as openwisp in the docker-compose.yml file and set as a variable in the Makefile. This makes it difficult to customize ownership for deployments that have different requirements or need to pull from a private registry/custom namespace.

For example, in Makefile:

USER = registry.gitlab.com/openwisp/docker-openwisp

And in docker-compose.yml:

image: openwisp/openwisp-dashboard:latest

Describe the solution you'd like
Allow the image owner to be configured via an environment variable (e.g., IMAGE_OWNER) in the .env file and used in docker-compose.yml. The solution should also unify this with the Makefile to ensure consistency.

Example implementation in docker-compose.yml:

image: ${IMAGE_OWNER:-openwisp}/openwisp-dashboard:${OPENWISP_VERSION:-latest}

P.S.: We can use a better variable name than IMAGE_OWNER, maybe just use USER.

Additional context
See related discussion: PR 555 discussion.

Contributor guide

Open the contributing guide

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 by comparing the image definitions in docker-compose.yml and the Makefile, then read the related PR 555 discussion for naming and consistency concerns. Verify the resulting Compose configuration with the relevant environment values and confirm that the image owner can be changed in one place while the default behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.