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

Ignoring unsupported options: build in v1.13.0-rc4 #29940

Open
akhildangore opened this issue Jan 6, 2017 · 14 comments
Open

Ignoring unsupported options: build in v1.13.0-rc4 #29940

akhildangore opened this issue Jan 6, 2017 · 14 comments

Comments

@akhildangore
Copy link

Hello All,

Docker version: v1.13.0-rc4

I am getting error : Ignoring unsupported options: build, Does it mean it will not create build from Dockerfile ?

And also getting same error for network_mode: Ignoring unsupported options: network_mode.

Below is command:
DOCKER_IMAGE=akhil123 docker stack deploy -c docker-compose.yml foo

Many thanks in advance.

@akhildangore akhildangore changed the title Ignoring unsupported options: build in Ignoring unsupported options: build Ignoring unsupported options: build in v1.13.0-rc4 Jan 6, 2017
@thaJeztah
Copy link
Member

I replied to your comment here; #29133 (comment)

The docker stack deploy feature, by design does not perform builds. Reason for this is that a build is performed on the host that the command is run from, so the image will only be available on that node. When deploying that image in a Swarm, the service cannot be started on other nodes. To deploy services, make sure the image you're deploying is pushed to a registry (or for testing; make sure the image is available on every node in the swarm)

developius added a commit to developius/dockercon-swarm-app that referenced this issue Mar 27, 2017
Docker stacks doesn’t support building an image so we use the hub (see
moby/moby#29940)
@D3nn
Copy link

D3nn commented Apr 13, 2017

Outside of the "build" directive (which I agree doesn't make much sense here), I'd like to request that the "network_mode" from the docker-compose file be supported. I know that there's already been some discussion around this from those who'd like to use it for network_mode:host capabilities, but personally I'm more interested in the network_mode:"service:<svc name>" and network_mode:"container:<container name|id>" capabilities.

I'd also like to see this supported in the docker service create command or at least have the --network option be able to include the same semantics as the network_mode does in the compose file.

The use cases I see for this are:

  • launching containers that share the same network stack so that applications can communicate with each other over a loopback interface (and don't have to worry about service discovery)
  • launching a container which contains a network toolset so that I can do some network diagnostics on processes that run in containers derived from "scratch" (such as containers running go programs).

The first use case would definitely benefit from reviving container affinity constraints from the old swarm, but that could be worked around for now using the supported placement constraints from v3 compose format.

@D3nn
Copy link

D3nn commented Apr 14, 2017

Should I open another issue for network_mode, or is the comment in this issue sufficient? (Just checking process-wise)

@thaJeztah
Copy link
Member

Yes, please open a separate issue. FWIW, network_mode:"container:<container name|id>" will be troublesome, as it basically says that all tasks of a service (and the "dependent service") must live on the same host

@trajano
Copy link

trajano commented May 30, 2017

If build is not supported in stack deploy when is it used then? Maybe https://docs.docker.com/compose/compose-file/#build should just be removed?

@cpuguy83
Copy link
Member

@trajano It's used with docker-compose.

@wesleyvicthor
Copy link

@trajano maybe just a proper docs update with the provided infos from @thaJeztah

@yoplait
Copy link

yoplait commented Jun 27, 2017

Then the problem is that you need a file to deploy (docker stack deploy) and another file to build (docker-compose)
And the problem on this is that you need to maintain double quantity of files, as if I am using version: "3.2" to support in my deployments ports mode host, and I need to be on version: '3' and without that params for the builds in docker-compose …

@vdemeester
Copy link
Member

Then the problem is that you need a file to deploy (docker stack deploy) and another file to build (docker-compose)

That's not really true, as you can use the same file for both (i.e. docker-compose build, docker-compose push to build and push and docker stack deploy to deploy).

@yoplait
Copy link

yoplait commented Jun 27, 2017

Thanks @vdemeester you are correct I just realized that I was not in the latest docker-compose … I was thinking that after to write my comment … sorry!

@ntwrkguru
Copy link

Actually, this is a lame decision. How hard would it be to build the image on all nodes? This complicates my life greatly as we provide stacks as a deliverable to customers and now will have to build and push EVERY variant of every image instead of building it at deploy as we did with compose. Thankfully, I can still build via Ansible and hope that the docker_stack module is released and full-featured soon.

@chiefy
Copy link

chiefy commented Apr 10, 2018

Using UCP and running into the same situation as others, my use case is I have a pretty simple docker image that needs to be built on docker stack deploy ... and I really don't care if it needs built on all nodes. In this case it only needs built on manager nodes really since it's a proxy.

@francisliyy
Copy link

@yoplait , How you support mode host in your deployment, could you show your docker compose file?
Thank you .

@jnorthrup
Copy link

jnorthrup commented Mar 31, 2019

it looks like the decision to HARD FORK the docker-compose, and then make BREAKING CHANGES willy nilly is the docker strategy here.

why does docker stack EXPRESSLY CITE docker-compose syntax without its own wiki/docs/whatever and then force the consumer to start hunting for error text keywords like

Ignoring unsupported options: build

who came up with this strategy? i dont see a single mention of "WHITELISTED DOCKER-COMPOSE DEPLOY KEYWORDS when i fumble through the official docker swarm migration steps

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

No branches or pull requests