Skip to content

[change] Make image owner configurable in docker-compose #565

Description

@pandafy

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dockerPull requests that update Docker codeenhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions