New answers tagged


The "official" nginx image has a specific path where it looks for files. You can either copy a file into the image by creating a new image from it or mount your files into this path as a volume. To copy files, have a folder with your index.html and a Dockerfile that looks like this: FROM nginx COPY index.html /usr/share/nginx/html Then build a new ...


running and copying files into the container: root@mordor:~# root@mordor:~# sudo docker run --name docker-nginx -p 80:80 -d nginx 29b4280504c2d46c10b8459de0844ba30bce0c1bc97b70521c3f812f29d17c27 root@mordor:~# root@mordor:~# docker cp index.html docker-nginx:/indx.html root@mordor:~# root@mordor:~# docker exec -it docker-nginx bash root@29b4280504c2:/# ...


Did you only try to reach localhost? Or even or Depending on the operating system, docker config and the internal networking setup, some problem can occurs to reach the docker network. You can inspect the container to get the network IP, maybe you can go there

Top 50 recent answers are included