Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to deploy a service running a httpd image

Shulou Source: shulou.com Published: 2022-06-01 00:53:28 10月04日 Update

This article introduces you how to deploy a service running httpd image, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Now deploy a service running the httpd image and execute the following command:

Docker service create-name web_server httpd

The form of the command to deploy service is similar to the docker run that runs the container-- name is named for service and httpd is the name of the image.

You can view the service in the current swarm through docker service ls.

You can see that the only copy of service is dispatched to swarm-worker1, and the current state is Preparing, which has not reached the desired state Running. We not only have to ask, what is this copy in Preparing?

In fact, the answer is very simple, swarm-worker1 is in the pull image, after the download is completed, the copy will be in the Running state.

If you feel uneasy, you can also go to swarm-worker1 to confirm that the httpd container is running.

So far, Service is not much different from ordinary containers.

On how to run the first Service to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

On how to deploy a service running httpd image to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Run mirror more content copy container status help good command article knowledge different ordinary similar interest name buddy partner form Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi OPPO Reno Huawei Xiaomi vpn