Search code examples
dockerdockerfiledocker-build

I can't see my html when I built container with docker


I have my container running like this enter image description here

in the file directory C:\Users\hailey\Desktop\GitTest Where my project file are.

# getting bse image nginx
FROM nginx 

MAINTAINER hailey

COPY . /usr/share/nginx/html

This is my docker file and I want to run my html file, which located in C:\Users\hailey\Desktop\GitTest enter image description here

When I accessed to http://127.0.0.1:8080/ I see only this page, which is not helloWorld.html enter image description here


Solution

  • you can copy and replace testhelloWorld.html with index.html

    COPY testhelloWorld.html /usr/share/nginx/html/index.html