Compose: Pipe docker-compose.yml

Created on 20 Aug 2017  路  8Comments  路  Source: docker/compose

It would be nice to be able to pipe a docker-compose.yml file into docker-compose. Yes, I know, it would not be good practice to run your production environments using this. However, it would be super useful for quickly testing different docker stack setups.

curl https://raw.githubusercontent.com/liberapay/liberapay.com/master/docker-compose.yml | docker-compose up
kinquestion

Most helpful comment

Nothing has changed guys.

All 8 comments

Use a -f with - (dash) as the filename to read the configuration from stdin. When stdin is used all paths in the configuration are relative to the current working directory.

source

Ah, thanks so much

-f is no longer a docker-compose option, it seems?

Maybe they actually added piping ???

Nothing has changed guys.

I assume the docs are saying that you can do some-command | docker-compose -f -. When running docker-compose -f - I get the help screen. Maybe the docs could be more explicit on what they mean by that, and how to use it?

Seeing the same error as @towc

@towc @felixhammerl

You are seeing the help screen because you must give a command to docker-compose

Try:

some-command | docker-compose -f - config

or

some-command | docker-compose -f - up
Was this page helpful?
0 / 5 - 0 ratings

Related issues

HackerWilson picture HackerWilson  路  3Comments

saulshanabrook picture saulshanabrook  路  3Comments

DhairyashilBhosale picture DhairyashilBhosale  路  3Comments

darkrasid picture darkrasid  路  3Comments

dazorni picture dazorni  路  3Comments