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

docker-compose #18

Closed
mahnunchik opened this issue Aug 10, 2016 · 10 comments
Closed

docker-compose #18

mahnunchik opened this issue Aug 10, 2016 · 10 comments

Comments

@mahnunchik
Copy link

Hi

Maybe it makes sense to have docker-compose inside the image? Or for example to have docker:compose version?

@tianon
Copy link
Member

tianon commented Aug 10, 2016 via email

@mahnunchik
Copy link
Author

Hi @tianon
Is it official?

@tianon
Copy link
Member

tianon commented Aug 10, 2016 via email

@mahnunchik
Copy link
Author

Thank you! I was a bit confused because docker/compose isn't in library organisation.

@mahnunchik
Copy link
Author

Hi @tianon do you know where is Dockerfile for https://hub.docker.com/r/docker/compose/

@tianon
Copy link
Member

tianon commented Aug 11, 2016

I don't see one officially linked, but:

$ docker history --no-trunc docker/compose:1.8.0
IMAGE                                                                     CREATED             CREATED BY                                                                                                                SIZE                COMMENT
sha256:89188432ef03b0233a597872ce571ce0ede5128c1c674b641968a8b21b1cac4a   2 weeks ago         /bin/sh -c #(nop)  ENTRYPOINT ["/usr/bin/docker-compose"]                                                                 0 B                 
<missing>                                                                 2 weeks ago         /bin/sh -c pip install --no-deps /code/docker-compose/docker-compose-*                                                    509.1 kB            
<missing>                                                                 2 weeks ago         /bin/sh -c #(nop) ADD file:44052a140c6a6d4083b947c1379574e19c6f58ff2f6362972c68608a5e873b5f in /code/docker-compose       737.5 kB            
<missing>                                                                 2 weeks ago         /bin/sh -c pip install -r /code/requirements.txt                                                                          5.65 MB             
<missing>                                                                 2 weeks ago         /bin/sh -c #(nop) COPY file:cbc44cf2aa7b12ba8dfddb382542e218ca3026372a9218577b7e497ebdfd30d6 in /code/requirements.txt    336 B               
<missing>                                                                 5 weeks ago         /bin/sh -c apk -U add             python             py-pip                                                               47.4 MB             
<missing>                                                                 6 weeks ago         /bin/sh -c #(nop) ADD file:852e9d0cb9d906535af512a89339fc70b2873a0f94defbcbe41cd44942dd6ac8 in /                          4.799 MB            

Lines up exactly with https://github.com/docker/compose/blob/1.8.0/Dockerfile.run 👍

@tback
Copy link

tback commented Sep 13, 2016

This doesn't feel right:
I learned that official images live in https://hub.docker.com/_/. There is no official compose image in the official part of docker hub.

Let's leave this for now, so it's docker/compose.
Now I docker run docker/compose to find that there is no latest tag.
Ok, then docker run docker/compose:1.8.0 .
I want to use it with gitlab-ci as a replacement for the official docker image (just with docker-compose) only to find out it doesn't work because the image shadowed running sh with it's entrypoint.

Nothing of this is particularly hard to do and I'll find my way around it (see below). Yet, the whole experience leaves me frustrated. I think docker can set a better example in clean design here.

#the workaround
FROM docker:latest

RUN apk -U add py-pip && pip install docker-compose

Can you provide tagged images here with compose installed (e.g. docker:1.12-compose)? That'd be really great!

Footnote:
Sorry for the many edits. I tried to make this as clear as possible and toned it down a little.

@tianon
Copy link
Member

tianon commented Sep 13, 2016

@tback yes, the name of the "official images" program is unfortunately somewhat confusing from that point of view -- the docker/compose image is "official" in the sense that it's created and maintained by the maintainers of the Docker Compose project, not that it's part of the top-level images program. They haven't yet expressed interest in creating a top-level official image, but if they were interested in doing so we'd really love to have one. 👍

@tianon
Copy link
Member

tianon commented Jun 1, 2017

Closing this for now in favor of docker/compose#4287 -- we can re-open/reconsider when we hear back from the Compose maintainers on whether this is something they'd like us to pursue. Thanks! 👍

@tianon tianon closed this as completed Jun 1, 2017
@tiangolo
Copy link

tiangolo commented Oct 4, 2017

For those with a need similar to @tback and me, a .gitlab-ci.yml like this worked for me:

image: docker:latest

before_script:
  - apk add --no-cache py-pip
  - pip install docker-compose
  - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
   
build-prod:
  stage: build
  script:
    - docker-compose -f docker-compose.prod.build.yml build
    - docker-compose -f docker-compose.prod.build.yml push

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