Skip to content

networks option for build #4095

Closed
Closed

Description

@philtay

The --network option for docker build has been recently merged. Please support it in Compose too. Something like this:

build:
  context: ./dir
  networks:
    - some-network
    - other-network

Activity

  1. shin- commented on Oct 31, 2016

    @shin-

    Thank you for the suggestion - we'll look into it as we get closer to the 1.13 Engine release.

  2. philtay commented on Nov 14, 2016

    @philtay
    Author

    1.13.0-rc1 has been released. Any thoughts on this? Thanks

  3. dreyks commented on Jan 26, 2017

    @dreyks

    actually 1.13 has already been released with the --network flag for build. anything new for this issue?

  4. gustavosbarreto commented on May 20, 2017

    @gustavosbarreto

    +1

  5. eyz commented on Jun 8, 2017

    @eyz

    I would like this our environment as well. We have some services are that required during the build process, that should be linked to the building containers for abstraction.

  6. added this to the 1.15.0 milestone on Jun 9, 2017
  7. brunolm commented on Jan 9, 2018

    @brunolm
  8. cjbottaro commented on Jan 9, 2018

    @cjbottaro

    And how do you determine the yaml version that your docker-compose is compatible with?

    $ docker-compose -v
    docker-compose version 1.17.1, build 6d101fb
    
    $ docker-compose version
    docker-compose version 1.17.1, build 6d101fb
    docker-py version: 2.5.1
    CPython version: 2.7.12
    OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016
    

    Is not helpful.

  9. dreyks commented on Jan 9, 2018

    @dreyks
  10. dreyks commented on Jan 9, 2018

    @dreyks
  11. safizn commented on Oct 15, 2018

    @safizn

    🐛 For those encountering network not found issue:
    Issue: Service X failed to build: network Y not found.
    Solution: Docker doesn't resolve the project name for the build network, it should be specified explicitly.
    <networkName> -> <projectName>_<networkName>
    Project name can be specified during execution:
    docker-compose --project-name <projectName> build <serviceName>

  12. four43 commented on Jan 7, 2019

    @four43

    @myuseringithub 's fix works. This should be resolved for us. I'll search for an existing ticket...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions