Skip to content

Instantly share code, notes, and snippets.

@tobiaswx
Forked from emilyst/99-usb-cdrom.rules
Created September 25, 2022 07:45
Show Gist options
  • Save tobiaswx/32b736c34c0ca86cf2eb0392960ee9a5 to your computer and use it in GitHub Desktop.
Save tobiaswx/32b736c34c0ca86cf2eb0392960ee9a5 to your computer and use it in GitHub Desktop.

Revisions

  1. @emilyst emilyst revised this gist Jul 23, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion procedure.md
    Original file line number Diff line number Diff line change
    @@ -17,5 +17,5 @@ In my setup, I have a shared folder for Media, for Downloads, and for Docker-rel
    * At this time, you should also `chmod 0666 /dev/sg6` (or whichever device you have) so that you don't have to reboot to apply the necessary permissions. (Requires root permissions with `sudo`.)
    9. Change directory: `cd /volume1/Docker/makemkv`.
    10. Create the container: `docker-compose up -d`.
    11. Access MakeMKV on your Synology unit at http://<synology>:5800/.
    11. Access MakeMKV on your Synology unit at http://\<synology\>:5800/.
    * You can either open up port 5800 in the firewall settings in DSM, or you can set up a reverse proxy configuration to access it securely. Both methods are outside the scope of this procedure.
  2. @emilyst emilyst revised this gist Jul 23, 2021. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions procedure.md
    Original file line number Diff line number Diff line change
    @@ -7,15 +7,15 @@ In my setup, I have a shared folder for Media, for Downloads, and for Docker-rel
    3. Connect USB CD-ROM drive to the physical NAS.
    4. Use `dmesg` to see which SCSI device was created.
    * In my case, it was `sg6`, so I knew that the device was created at `/dev/sg6`. Adjust as needed for your own purposes.
    5. `mkdir -p /volume1/Docker/makemkv/config`
    5. Create the needed directories: `mkdir -p /volume1/Docker/makemkv/config`
    6. Copy `docker-compose.yml` from below to `/volume1/Docker/makemkv`.
    * Adjust any directory names if needed.
    * Adjust the name of the SCSI device if needed.
    * Adjust the `MAKEMKV_KEY` environment variable value to contain your key.
    * Adjust any other environment variables needed. See [documentation](https://github.com/jlesage/docker-makemkv#environment-variables).
    8. Copy `99-usb-cdrom.rules` from below to `/lib/udev/rules.d/`. (Requires root permissions with `sudo`.)
    * At this time, you should also `chmod 0666 /dev/sg6` (or whichever device you have) so that you don't have to reboot to apply the necessary permissions. (Requires root permissions with `sudo`.)
    9. Change directory to `/volume1/Docker/makemkv`.
    10. Run `docker-compose up -d`.
    9. Change directory: `cd /volume1/Docker/makemkv`.
    10. Create the container: `docker-compose up -d`.
    11. Access MakeMKV on your Synology unit at http://<synology>:5800/.
    * You can either open up port 5800 in the firewall settings in DSM, or you can set up a reverse proxy configuration to access it securely. Both methods are outside the scope of this procedure.
  3. @emilyst emilyst created this gist Jul 23, 2021.
    1 change: 1 addition & 0 deletions 99-usb-cdrom.rules
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    SUBSYSTEMS=="usb", ATTRS{idVendor}=="", ATTRS{idProduct}=="", GROUP="cdrom", MODE="0666"
    22 changes: 22 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    version: '3'

    services:
    makemkv:
    image: jlesage/makemkv:latest
    container_name: makemkv
    restart: unless-stopped
    network_mode: bridge
    ports:
    - "5800:5800"
    environment:
    MAKEMKV_KEY: <redacted>
    USER_ID: 1026
    GROUP_ID: 101
    AUTO_DISC_RIPPER: 1
    APP_NICENESS: 19
    volumes:
    - "/volume1/Docker/makemkv/config:/config:rw"
    - "/volume1/Downloads:/storage:ro"
    - "/volume1/Media:/output:rw"
    devices:
    - "/dev/sg6:/dev/sg6"
    21 changes: 21 additions & 0 deletions procedure.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    These are the steps I used to get MakeMKV working from Docker on my Synology NAS (DS1520+).

    In my setup, I have a shared folder for Media, for Downloads, and for Docker-related files. Amend these steps for your own purposes by using directories which exist on your NAS. My USB Blu-ray drive is a Pioneer BDR-XD05B.

    1. Enable SSH if needed.
    2. SSH to the Synology NAS.
    3. Connect USB CD-ROM drive to the physical NAS.
    4. Use `dmesg` to see which SCSI device was created.
    * In my case, it was `sg6`, so I knew that the device was created at `/dev/sg6`. Adjust as needed for your own purposes.
    5. `mkdir -p /volume1/Docker/makemkv/config`
    6. Copy `docker-compose.yml` from below to `/volume1/Docker/makemkv`.
    * Adjust any directory names if needed.
    * Adjust the name of the SCSI device if needed.
    * Adjust the `MAKEMKV_KEY` environment variable value to contain your key.
    * Adjust any other environment variables needed. See [documentation](https://github.com/jlesage/docker-makemkv#environment-variables).
    8. Copy `99-usb-cdrom.rules` from below to `/lib/udev/rules.d/`. (Requires root permissions with `sudo`.)
    * At this time, you should also `chmod 0666 /dev/sg6` (or whichever device you have) so that you don't have to reboot to apply the necessary permissions. (Requires root permissions with `sudo`.)
    9. Change directory to `/volume1/Docker/makemkv`.
    10. Run `docker-compose up -d`.
    11. Access MakeMKV on your Synology unit at http://<synology>:5800/.
    * You can either open up port 5800 in the firewall settings in DSM, or you can set up a reverse proxy configuration to access it securely. Both methods are outside the scope of this procedure.