mirror of
https://github.com/docker/docs.git
synced 2026-04-12 06:19:22 +07:00
1005 B
1005 B
title, description, keywords
| title | description | keywords |
|---|---|---|
| Default host | Learn how to publish a service to be a default host. | routing, proxy |
Publishing a default host service
The following example publishes a service to be a default host. The service responds whenever there is a request to a host that is not configured.
First, create an overlay network so that service traffic is isolated and secure:
$> docker network create -d overlay demo
1se1glh749q1i4pw0kf26mfx5
Next, create the initial service:
$> docker service create \
--name demo-default \
--network demo \
--detach=false \
--replicas=1 \
--label com.docker.lb.default_backend=true \
--label com.docker.lb.port=8080 \
ehazlett/interlock-default-app
Interlock detects when the service is available and publishes it. After tasks are running and the proxy service is updated, the application is available via any url that is not configured:
