Public Repository

Last pushed: 2 years ago
Short Description
Provide web access to local files
Full Description

NGINX Web Access

Use docker-compose to run NGINX server providing web access to local files

Feature

  • Linux
    Provide local web access to local files via http://127.0.0.1
    Provide remote web access to local files via http://<linux_server_ip>
  • iOS
    Provide local web access to local files via http://192.168.99.100

Usage

  1. Set environment variable NGINX_DATA_PATH
     $ echo 'export NGINX_DATA_PATH=<local_file_path>' >> ~/.bashrc
     $ source ~/.bashrc
    
    e.g. echo 'export NGINX_DATA_PATH=/tmp' >> ~/.bashrc
  2. Prepare docker-compose.yml with the following content
     nginx-web-access:
       container_name: nginx-web-access
       restart: always
       image: evaou/nginx-web-access
       volumes:
         - $NGINX_DATA_PATH:/usr/share/nginx/html
       tty: true
       ports:
         - "80:80/tcp"
    
  3. Under the same folder of docker-compose.yml, run docker-compose command
     $ docker-compose up -d
    
  4. Access local files via
    http://127.0.0.1 (Linux)
    http://192.168.99.100 (iOS)
    http://<linux_server_ip> (Linux)
Docker Pull Command
Owner
evaou