Deploy a single service
Estimated reading time: 2 minutesThis topic applies to Docker Enterprise.
The Docker Enterprise platform business, including products, customers, and employees, has been acquired by Mirantis, inc., effective 13-November-2019. For more information on the acquisition and how it may affect you and your business, refer to the Docker Enterprise Customer FAQ.
You can deploy and monitor your services from the UCP web UI. In this example, we’ll deploy an NGINX web server and make it
accessible on port 8000
.
To deploy a single service:
- In your browser, navigate to the UCP web UI and click Services. The Create a Service page opens.
-
Click Create Service to configure the NGINX service.
-
Complete the fields according to the information provided in the following table:
Field Value Service name nginx Image name nginx:latest - In the left pane, click Network.
-
In the Ports section, click Publish Port and complete the following fields:
Field Value Target port 80 Protocol tcp Publish mode Ingress Published port 8000 - Click Confirm to map the ports for the NGINX service.
-
Specify the service image and ports, and click Create to deploy the service into the UCP cluster.
Once the service is up and running, you can view the default NGINX
page by going to http://<node-ip>:8000
. In the Services list, click the
nginx service, and in the details pane, click the link under
Published Endpoints.
Clicking the link opens a new tab that shows the default NGINX home page.
Use the CLI to deploy the service
You can also deploy the same service from the CLI. Once you’ve set up your UCP client bundle, enter the following command:
docker service create --name nginx \
--publish mode=ingress,target=80,published=8000 \
--label com.docker.ucp.access.owner=<your-username> \
nginx
For more information about UCP client bundles, see CLI-based access.