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

Multiple compose files seems to be broken #1048

Closed
Uelb opened this issue Jul 9, 2018 · 7 comments
Closed

Multiple compose files seems to be broken #1048

Uelb opened this issue Jul 9, 2018 · 7 comments

Comments

@Uelb
Copy link

Uelb commented Jul 9, 2018

Hi,

I'm trying to convert 2 different compose files :

# docker-compose.yml
version: '2'
services:
  app:
    command: script/run.sh
    ports:
      - 3000
  nginx:
    image: nginx
    volumes_from:
      - app
    depends_on:
      - app

And

# docker-compose.production.yml
version: '2'
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile.prod
    image: my_image
    volumes:
      - ./file_storage:/app/public/system/
      - assets:/app/public/assets/
    environment:
      PASS: ${PASS}
  nginx:
    ports:
      - 80
    volumes:
      - ./nginx.production.conf:/etc/nginx/conf.d/default.conf
volumes:
  assets:
networks:
  nginx_default:
    external: true

I have an error when running :

kompose convert --stdout -f docker-compose.yml -f docker-compose.production.yml

ERRO Could not parse config for project members : Service 'app' has neither an image nor a build context specified. At least one must be provided.
FATA composeObject.Parse() failed, Failed to load compose file: Service 'app' has neither an image nor a build context specified. At least one must be provided.

It seems like the docker-compose version takes priority and that the docker-compose production yml is not read. When I change the order of the -f options, I have a similar error with the nginx service having no build context.

My kompose version is 1.15.0 (e3cd4d4).
My OS is MAC OS High Sierra (10.13.14)

When using docker-compose cli, I successfully can run this configuration with docker-compose -f docker-compose.yml -f docker-compose.production.yml up

I have trouble understanding why it does not work correctly.

@Uelb
Copy link
Author

Uelb commented Jul 9, 2018

Actually, I just saw this issue : #968

It seems like what I'm looking for is not a supported feature right ? "Multiple docker-compose files" is supported but not by merging them ?

@hangyan
Copy link
Contributor

hangyan commented Jul 10, 2018

@Uelb I think PR #990 have fix this, but it seems have some bugs, i will check it again.

@Uelb
Copy link
Author

Uelb commented Jul 10, 2018

Thank you !

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 8, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 7, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@hangyan hangyan removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants