I set up a NAS on the LAN using Raspberry Pi 3 and a USB HDD.
I used to do the same thing without using Docker, but as I was playing with adding and removing various functions to the Raspberry Pi, I began to worry that the environment became dirty. So I decided to rebuild the environment from scratch with the upgrade to Raspbian Buster and manage it with Docker Compose.
sudo apt update
sudo apt full-upgrade
/ mnt / hdd1)
docker-compose up -d
\\ [Raspberry Pi name] \ sharefrom the network
\\ [Raspberry Pi name] \ share \ media
version: '3.4' services: minidlna: image: cytomich/rpi-docker-minidlna container_name: minidlna volumes: - /mnt/hdd1/media:/media:z environment: - MINIDLNA_MEDIA_DIR=/media - MINIDLNA_PORT=8200 - MINIDLNA_FRIENDLY_NAME=NASpi network_mode: "host" restart: always samba: image: dperson/samba container_name: samba networks: - default ports: - "137:137/udp" - "138:138/udp" - "139:139/tcp" - "445:445/tcp" read_only: true tmpfs: - /tmp restart: always stdin_open: true tty: true volumes: - /mnt/hdd1:/mnt/share:z command: '-s share;/mnt/share;yes;no;yes'
Performance is good. As for the DLNA function, I could play it without any problem if it was about MP4 of several hundred kbps. Since it is a Raspberry Pi, overconfidence is prohibited, but it seems that there is a little more room.
docker-compose.yml to create your own strongest home server!