Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support additional_contexts #762

Closed
otto-liljalaakso-nt opened this issue Sep 8, 2023 · 0 comments · Fixed by #763
Closed

Support additional_contexts #762

otto-liljalaakso-nt opened this issue Sep 8, 2023 · 0 comments · Fixed by #763
Labels
enhancement New feature or request

Comments

@otto-liljalaakso-nt
Copy link
Contributor

otto-liljalaakso-nt commented Sep 8, 2023

Is your feature request related to a problem? Please describe.
I have a project that is split to multiple sub-projects that share a common set of data.
Each sub-project includes a docker-compose.yml for setting things up.
To include the shared data, I would like to do this in docker-compose.yml:

services:
  myservice:
    build:
      context: .
      additional_contexts:
        data: ../data

And then in Dockerfile for myservice:

COPY --from=data somedata.json /data/somedata.json

But, when I run podman-compose, I see this:

[4/4] STEP 4/8: COPY --from=data somedata.json /data/somedata.json
? Please select an image: 
  ▸ registry.fedoraproject.org/data:latest
    registry.access.redhat.com/data:latest
    docker.io/library/data:latest
    quay.io/data:latest

Describe the solution you'd like
Implement additional_contexts from the Compose Specification.

Describe alternatives you've considered

  1. Use Docker Compose instead, which implements that feature.
  2. Restructure my project so that each subproject contains a copy of the data directory,
    or copy the data to sub-projects folder in a preparatory build step.
    This would work, but requires restructuring the project even though additional_contexts is part of the Compose Specification.

Additional context
Yes, please! 😁

@otto-liljalaakso-nt otto-liljalaakso-nt added the enhancement New feature or request label Sep 8, 2023
theyoyojo pushed a commit to underground-software/podman-compose that referenced this issue Feb 21, 2024
charliemirabile pushed a commit to underground-software/podman-compose that referenced this issue Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant