step1: create nginx folder
mkdir /lkh/nginx
mkdir /lkh/nginx/html
mkdir /lkh/nginx/conf
step2: run nginx's docker container
docker run --name ng -p 8080:80 lkh520/nginx
step3: cp nginx's configuration and html folder from nginx container
docker cp ng:/etc/nginx/nginx.conf /lkh/nginx/conf/nginx.conf
docker cp ng:/usr/share/nginx/html /lkh/nginx/html
step4: remove temp container
docker stop ng
docker rm ng
step5: run nginx's docker container
docker run --name nginx -p 80:80 -v /lkh/nginx/html:/usr/share/nginx/html -v /lkh/nginx/conf/nginx.conf:/etc/nginx/nginx.conf -v /lkh/nginx/conf:/etc/nignx -d lkh520/nginx
Content type
Image
Digest
sha256:579a87e84…
Size
30.9 MB
Last updated
almost 2 years ago
docker pull lkh520/nginx:1.27.3