Skip to content

docker-compose build --push <registry> #1126

Closed

Description

@cy8aer

This would be a nice feature for creating and deploying of containers on a different (development) machine than the productive ones (which may run via image: option)

Activity

  1. changed the title [-]docker-compose build --push <repository>[/-] [+]docker-compose build --push <registry>[/+] on Mar 17, 2015
  2. dnephin commented on Mar 18, 2015

    @dnephin

    Some related issues #213, #457

  3. jmmills commented on Jul 13, 2015

    @jmmills

    I would give this a +1 as either an addition to docker-compose or as part of a different "build tool".
    In addition it would be nice (and UNIXy) to add an "images" verb, so as to output a flat list of the images built by the tool.
    I'm thinking things like this would be possible:

    $ docker-compose build
    $ docker-compose images | while read i; do docker save $i -o $i.tgz ; done
    

    Thoughts?

    [Addendum] Additionally, this would perhaps solve the problem of pushing?

    $ docker-compose images | while read i ; do docker push my.registry.server:5000/$i ; done
    
  4. PeterRJones commented on Dec 8, 2015

    @PeterRJones

    +1
    docker-compose is the best/easiest way to build a bundle of related docker images. Being able to easily push these resulting docker images to a registry is a natural extension of this workflow. My use-case is a development use-case where a bundle of images are built by Jenkins. I'd like to be able to easily push these images somewhere for developers to pull and use/run.

  5. FelikZ commented on Dec 9, 2015

    @FelikZ

    👍

  6. rashtao commented on Dec 11, 2015

    @rashtao

    +1

  7. binaryanomaly commented on Dec 30, 2015

    @binaryanomaly

    +1

  8. arthurbarros commented on Jan 8, 2016

    @arthurbarros

    +1

  9. crackmac commented on Feb 4, 2016

    @crackmac

    +1 (and another +1 for a vote feature in github)

  10. clemensberndt commented on Feb 9, 2016

    @clemensberndt

    +1

  11. tgagor commented on Feb 26, 2016

    @tgagor

    +1

  12. bonclay7 commented on Feb 26, 2016

    @bonclay7

    +1

  13. wjpbiblio commented on Feb 26, 2016

    @wjpbiblio

    +1

  14. 31 remaining items

  15. jhagege commented on Sep 15, 2016

    @jhagege

    +1

  16. prdonahue commented on Sep 19, 2016

    @prdonahue

    +1

  17. Rinkana190 commented on Oct 14, 2016

    @Rinkana190

    +1

  18. kilianc commented on Oct 21, 2016

    @kilianc

    +1

  19. ldshi commented on Oct 31, 2016

    @ldshi

    +1

  20. ldshi commented on Oct 31, 2016

    @ldshi

    So can someone explain the status of this proposal? @aanand @Vanuan @michael-k

    And actually after this I just went through these two topics also: Deploying a registry server and #3900 - Docker compose pull does not work with custom registry

    It's a bit hard to understand, since docker has both the abilities 'running a registry server' and 'docker-compose(pull)', why not integrate these two seamlessly?

    But still recommend this proposal: just integrate with a well-known service providers, like Github, Bitbucket, AWS, Google Cloud, Azure etc, running own registry server the speed, security gonna be some serious problem/bottleneck.

  21. valiro21 commented on Jan 2, 2017

    @valiro21

    +1

  22. mathroc commented on Apr 17, 2017

    @mathroc

    you can now choose the image name & tag when building a service:

    If you specify image as well as build, then Compose names the built image with the webapp and optional tag specified in image:

    – https://docs.docker.com/compose/compose-file/#build

    this name is then used when using docker-compose push

    that mean you do something like this:

    services:
      service:
        build: .
        image: registry.acme.com/acme/service:latest

    and it works !

    # docker-compose push
    Pushing service (registry.acme.com/acme/service:latest)...
    The push refers to a repository [registry.acme.com/acme/service]
    
  23. wayoung commented on May 30, 2017

    @wayoung

    If I push 3 services to a private repository using this method and a single docker-compose.yml, can I docker-compose pull all three services with just one command, or do I need to pull them all back separately?

  24. omercnet commented on May 30, 2017

    @omercnet

    @wayoung you can simply 'docker-compose pull' to pull all the remote images

  25. wayoung commented on May 30, 2017

    @wayoung

    That only works if I am in the same directory as the docker-compose.yml. I'm thinking of the case where I docker-compose push to the registry, then try to pull it down on another machine without the original docker-compose.yml. Is that possible?

  26. Vanuan commented on May 31, 2017

    @Vanuan

    @wayoung
    How it's supposed to know which images you're trying to pull without any information provided by you?
    You'd still need compose file to start services, why won't you just copy it?

  27. ijc commented on Mar 26, 2019

    @ijc

    Issue grooming: According to #1126 (comment) this was fixed (by providing docker-compose push) in 1.8 rc2. Therefore closing.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions