Skip to content

Minimal Docker container for mTCP NetDrive server - mount DOS disk images over network

License

Notifications You must be signed in to change notification settings

er0080/netdrive-docker

Repository files navigation

mTCP NetDrive Docker Container

A minimal Docker container for running the mTCP NetDrive server, which allows DOS machines to mount remote disk images over a network.

About mTCP NetDrive

NetDrive is part of the mTCP suite of TCP/IP applications for DOS. The server component runs on modern systems (Linux, Windows, Mac) and serves disk images to DOS clients over UDP.

Quick Start

Using Pre-built Image from Docker Hub (Easiest)

# Create directory for disk images
mkdir -p images

# Run the container
docker run -d \
  --name mtcp-netdrive \
  -p 2002:2002/udp \
  -v $(pwd)/images:/data/images \
  er0080/mtcp-netdrive:latest

Using Docker Compose (Recommended for local development)

  1. Clone this repository:

    git clone https://github.com/er0080/netdrive-docker.git
    cd netdrive-docker
  2. Create a directory for your disk images:

    mkdir -p images
  3. Place your disk images (.dsk files) in the images/ directory

  4. Start the container:

    docker-compose up -d
  5. View logs:

    docker-compose logs -f

Building from Source

  1. Clone the repository:

    git clone https://github.com/er0080/netdrive-docker.git
    cd netdrive-docker
  2. Build the image:

    docker build -t mtcp-netdrive .
  3. Run the container:

    docker run -d \
      --name mtcp-netdrive \
      -p 2002:2002/udp \
      -v $(pwd)/images:/data/images \
      -e NETDRIVE_PORT=2002 \
      mtcp-netdrive

Environment Variables

Configure the NetDrive server using these environment variables:

Variable Default Description
NETDRIVE_PORT 2002 UDP port the server listens on
NETDRIVE_IMAGES_DIR /data/images Directory containing disk images

Connecting from DOS

On your DOS client with mTCP configured:

netdrive connect <server-ip>:2002 <image-name>.dsk <drive-letter>:

Example:

netdrive connect 192.168.1.100:2002 dos622.dsk d:

Volume Mounts

  • /data/images - Directory containing your disk images (.dsk files)

Mount your local directory containing disk images to this path.

Creating Disk Images

You can create disk images using various tools:

  • On Linux: Use dd or disk imaging tools
  • On Windows: Use WinImage or similar tools
  • Existing DOS installations: Use disk imaging utilities

Example using dd to create a 100MB image:

dd if=/dev/zero of=images/mydisk.dsk bs=1M count=100

Ports

  • 2002/udp - NetDrive server port (configurable via NETDRIVE_PORT)

Note: NetDrive uses UDP protocol, not TCP.

Security Considerations

  • NetDrive is designed for trusted networks
  • Consider firewall rules if exposing to the internet
  • Use VPN for remote access over untrusted networks
  • The server requires no special permissions

Troubleshooting

Check server logs

docker-compose logs -f

List running containers

docker ps

Test UDP connectivity

From another machine:

nc -u <server-ip> 2002

Enable verbose logging

The server runs in headless mode by default in Docker. Check container logs with docker-compose logs -f to monitor server activity.

Building from Source

The NetDrive server is written in Go. To build from source instead of using the binary:

  1. Download source from https://www.brutman.com/mTCP/
  2. Modify Dockerfile to build from source instead of downloading binary

License

This Docker container configuration is provided as-is. The mTCP NetDrive software is licensed under GPLv3 by Michael Brutman.

References

About

Minimal Docker container for mTCP NetDrive server - mount DOS disk images over network

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •