简体   繁体   中英

i have problem when i use Docker container is not using my local html file

First i create normal Docker file and used

FROM nginx:latest

COPY. /usr/share/nginx/html

inside Dockerfile

it create images and containers perfectly

but my friend by mistake write this in the terminal:

docker run -d -p 80:80 docker/getting-started

every time I create image or container will let me go to this website the first code i write after i delete the images and continers: docker build.

my image command: docker build -t image name.

my container command: docker run -d -p 80:80 Image ID

note: the container was run my HTML file normal but my friend used that command I don't know why but I need to fix it i just want my container run my HTML file

code picture

The wrong website

Stop the docker engine and remove all images and then built the image

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM