Step 1: Download nginx through docker
docker pull hub.c.163.com/library/nginx:latest
View
docker images in the docker image
Step 2: Run an instance in
docker docker run hub.c.163.com/ library/nginx
Here, you will find that the terminal cursor keeps flashing, indicating that nginx is running in the foreground.
At this time, open another terminal and enter
docker ps to
find that nigix is running.
Step 2: If you want nginx to run in the background, add the parameter -d. It can be found that the
successful return of the operation is an id number, which is consistent with the front of the new nigix instance id
run an nginx in docker
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=324781442&siteId=291194637
Recommended
Ranking