Sign inSign up

dhanushreddy29/simple-file-server

By dhanushreddy29

Updated about 1 year ago

Share files locally with ease. This Dockerized browser offers a simple, secure web interface.

Image
Networking
Web servers
0

1.1K

dhanushreddy29/simple-file-server repository overview

Simple Python File Browser (Dockerized)

A minimalist and lightweight web-based file browser, allowing you to easily share files over your local network with a clean user interface. This solution is built with Python's Flask micro-framework and is designed for quick deployment via Docker.


Features

  • Simple Web UI: Browse files and folders with an intuitive interface.
  • Directory Navigation: Easily navigate through subdirectories using breadcrumbs and a "Parent Directory" link.
  • Direct File Downloads: Click on any file to download it instantly.
  • File & Folder Details: Displays names, types (file/folder), sizes (formatted), and last modified dates.
  • Lightweight & Secure: Built on Flask for minimal resource usage, with host directory mounted as read-only by default for safety.
  • Dockerized: Easy to pull and run with a single command.

How to Use

1. Pull the Docker Image

First, pull the image from Docker Hub:

docker pull dhanushreddy29/simple-file-server
2. Run the Container

Once pulled, run the container, mapping a local port and mounting the host folder you wish to share.

docker run -d \
  --name my-local-share \
  -p 8000:8000 \
  -v /path/to/your/local/folder:/usr/share/web:ro \
  dhanushreddy29/simple-file-server

Important Notes:

  • /path/to/your/local/folder: Replace this with the absolute path to the directory on your computer that you want to share.
    • Example (Linux/macOS): /home/user/MySharedFiles
    • Example (Windows): C:\Users\YourUser\Documents\SharedFiles
  • :ro: (Optional) This mounts the volume as read-only, preventing the container from modifying your original files. This is recommended for simple file sharing. If you remove :ro, the container would have write access to that folder on your host.
  • -p 8000:8000: This maps port 8000 on your Docker host to port 8000 inside the container. You can change the first 8000 to any unused port on your host (e.g., -p 9000:8000) if port 8000 is already in use.
3. Access the File Browser
  1. Find your Docker Host's IP Address:

    • Linux/macOS: Open a terminal and type ip a or ifconfig. Look for your main network interface (e.g., eth0, wlan0, en0) and find its inet address (IPv4).
    • Windows: Open Command Prompt or PowerShell and type ipconfig. Look for your active network adapter (e.g., "Ethernet adapter", "Wireless LAN adapter Wi-Fi") and find its "IPv4 Address".
  2. Open in Browser: From any device connected to the same local network, open a web browser and go to:

    http://YOUR_DOCKER_HOST_IP:8000
    

    (Replace YOUR_DOCKER_HOST_IP with the actual IP address you found).

You should now see the user-friendly file browser displaying the contents of your shared folder!


Technical Details (for reference)

This image is built upon a python:3.13-alpine base image and uses Flask to serve the web interface. The application expects the shared files to be mounted at /usr/share/web inside the container.


Tag summary

Content type

Image

Digest

sha256:3d9b0e54e

Size

21.1 MB

Last updated

about 1 year ago

docker pull dhanushreddy29/simple-file-server