I have a single bare metal machine running CoreOS and a bunch of Docker containers, e.g.nginx and gitlab.

nginx should be a reverse proxy for gitlab so it needs to have network connectivity and hostname resolution to the gitlab container.

I used to do this via docker run --name nginx --link gitlab:gitlab ... but that's deprecated and the Docker documentation recommends using Docker's "user defined networks".

I can create one of those with docker network create ... but I want it to be automatically created on boot.

How do I configure that in CoreOS's cloud-config? My first idea was to create a System unit that just runs the command. Is that how it supposed to be done?

1 Answer 1


The more CoreOS way of doing this would be a fleet unit, then you can define the dependancies with your other units.

So you might have a fleet unit called mynetwork dependant on docker, and then your nginx and gitlab units would be dependant on mynetwork

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .