-
Notifications
You must be signed in to change notification settings - Fork 771
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
Bug: Adding networks:
to docker-compose.yaml file results in a runtime error
#474
Comments
Uh oh, that doesn't look right. what commands did you use / docker-compose file to get this error? @peterpme |
Hey @cdrage thanks for the quick response! I ran |
this seems to be coming from libcompose, and would like more info on this about how does the docker-compose file looks like? @peterpme do you mind sharing docker-compose file? |
@surajssd thanks for the quick response! Absolutely, if you could help me get this onto GCloud / Kubernetes I'd be very happy :) It's an nginx reverse proxy splitting 3 different apps. Nginx handles SSL too.
version: '2'
services:
nginx:
image: peterpme/nginx
container_name: nginx
networks:
- peterpme-infra
ports:
- "80:80"
- "443:443"
environment:
- CERTS=www.peterp.me
- EMAIL=peter@peterp.me
volumes:
- /etc/ssl/dhparam:/etc/ssl/dhparam
- /srv/letsencrypt:/etc/letsencrypt
cms:
image: peterpme/cms
container_name: cms
environment:
- NPM_TOKEN
- NODE_ENV=production
- PORT=5000
- MONGODB_URI=
- CLOUDINARY_URL=
- COOKIE_SECRET=
- NEW_RELIC_ENABLED=false
networks:
- peterpme-infra
search:
image: peterpme/search
container_name: search
environment:
- NPM_TOKEN
- NODE_ENV=production
- APP_ENV=
- PORT=5000
- GOOGLE_PLACES_API_KEY=
- NEW_RELIC_ENABLED=false
networks:
- peterpme-infra
api:
image: peterpme/api-next
container_name: api
environment:
- NPM_TOKEN
- NODE_ENV=production
- DB_CONNECTION_STRING=
- MAILCHIMP_API_KEY=
- NEW_RELIC_ENABLED=false
networks:
- peterpme-infra
networks:
peterpme-infra: Thank you! |
Hey @peterpme It's
That's somehow screwing it up, just remove those two lines and it'll convert fine. I'll open up another issue for this, these panics shouldn't be happening. Thanks for opening up this issue and let us know if there is anything else we can do to help! |
Hey @cdrage thanks! Will there be any implications on my end if I remove networks? Will the containers still be able to communicate with nginx? |
@peterpme Since Kubernetes is a flat-design in terms of network (there's no segregation of networks) any container created will be able to communicate to the other one. The objective is to get you started with Kubernetes. Since your docker-compose file is quite complex ,it may take some modifications to get it running (the first being persistent volumes would need to be created!) |
Hey @peterme, I'm going to leave this issue open and simply rename the title :) Better to keep the context in here rather than another issue. |
networks:
to docker-compose.yaml file results in a runtime error
@surajnarwade Yes. The problem here is that this panics, so some investigation is required. I have a feeling it's because it's trying to parse:
and it's coming up as incorrect yaml. |
@cdrage 👍 |
@cdrage @peterpme , I tried out above example and checked with https://docs.docker.com/compose/networking/ and its working in following cases: as
or if it is pre existing network:
or if its not a default network, then mention network driver as below:
|
It looks like this is bug in libcompose.
works with docker-compose:
but fails with libcompose:
|
@kadel , I have opened an issue regarding this in libcompose, which can be tracked here, docker/libcompose#456 |
@kadel, @cdrage I have sent PR for this issue in libcompose, which can be tracked here, docker/libcompose#467 |
It resolves issues kubernetes#474 and kubernetes#589 which were coming from libcompose, as well as resolves kubernetes#440 and kubernetes#437 partially as `group_add` & `stop_grace_period` are supported by libcompose now.
I tried above docker compose file, its working well now,
we can close this issue now |
It resolves issues kubernetes#474 and kubernetes#589 which were coming from libcompose, as well as resolves kubernetes#440 and kubernetes#437 partially as `group_add` & `stop_grace_period` are supported by libcompose now.
kompose version 0.3.0 (135165b3)
go version go1.8 darwin/amd64
The text was updated successfully, but these errors were encountered: