Skip to content

robheerdink/nginx-localhost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# build
docker build . -t nginx-localhost

# run (-d --detached)
docker-compose up -d

# Run a web server to serve the current directory
docker container run  -d --rm -p 80:80 -v ${PWD}:/var/lib/nginx/html:ro nginx-localhost
# connect to container
docker exec -ti localhost sh

# check config
vi /etc/nginx/http.d/default.conf

# check if you can access synlink in continer
cd /var/lib/nginx/html
cd <symlink>

# in docker-compose.yml we must give add the mounts between host and container
# - host current working directory: ngninx root folder
# - <host symlink> : <path container> (container has access to /home/<user>)"
volumes:
    - ${PWD}:/var/lib/nginx/html:ro
    - ${PWD}/Videos:/home/rob/Videos

About

nginx docker with auto index, folow sysmbolic

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published