My Media for Alexa Docker Image

Installing as a Docker Image

Installing as a Docker Image


Docker is a fantastic technology that performs operating system level virtualization using "containers". Docker containers allow a single package to be created containing an application, all dependencies plus an abstraction of an underlying Operating System (eg a lightweight linux build) that allows it to run as a standalone, protected virtual system. The beauty of containers is that because the image essentially contains its own layer of the operating system, the resulting image can run on any linux distribution without fear of version or dependency inconsistencies.

My Media for Alexa is available as a Docker image allowing it to be run on any x64 / armhf linux operating system or any other device that can host a docker container (eg supported NAS's).

You can either run the My Media for Alexa docker image direct from Docker Hub or download from the image from our websites and install manually. Docker hub is by far the easiest way and therefore recommended.

In either case, please be aware of the following when running My Media for Alexa a container:

  1. The My Media Docker image EXPOSE's two ports which must be mapped directly through to the same ports on your computer's IP address. These ports are tcp/52050 and tcp/52051. This is because My Media advertises its IP address and port so that it can be found by your Alexa devices and therefore the IP address and port must be accessible on your ethernet/wifi network and cannot be the internal NAT address/ports that Docker may configure.
  2. Docker images are stateless - i.e. they should not store data that is going to change. My Media relies on maintaining configuration about your Media Server, watch folders, settings and also its database of indexed files. Additionally, Docker containers are by default protected from the rest of your file system, i.e. they cannot access any files outside of their chroot environment - including your media files! My Media obviously needs access to your music library in order to stream it. To deal with these needs, My Media for Alexa's Docker image exposes two volumes which need to be remapped when you run the container:
    1. /datadir --> should be remapped to a directory that will hold My Media's stateful files - settings and database, etc
    2. /medialibrary --> should be remapped to a directory that holds the media you want to be indexed

If you need further information on port or volume remapping, please see the relevant Docker documentation.

BETA Note Docker support is in beta only.

Method 1. Run via Docker Hub

  1. Open a console on your linux machine
  2. Ensure you have installed docker successfully - we do not cover this in this tutorial as there are thousands of internet tutorials on this step.
  3. Create a directory for storing My Media for Alexa data files, eg ~/.MyMediaForAlexa
  4. Type the following to download and run the My Media for Alexa docker image - bizmodeller/mymediaforalexa; note the remapped datadir and medialibrary paths - please ensure you have created these on your own system first:
    # sudo docker run -d -p 52050:52050 -p 52051:52051 -v ~/Music:/medialibrary -v ~/.MyMediaForAlexa:/datadir bizmodeller/mymediaforalexa
    Unable to find image 'bizmodeller/mymediaforalexa:latest' locally
    latest: Pulling from bizmodeller/mymediaforalexa
    1eae7a7426b0: Already exists
    0fb355a41175: Pull complete
    c259e5f6957f: Pull complete
    5f06e2c512ca: Pull complete
    2b6e0a23d512: Pull complete
    dacd347f6c9a: Pull complete
    676299e748d4: Pull complete
    cc23474cd902: Pull complete
    f931b7cc957a: Download complete
    f3d0aeb5286b: Download complete
    5faf6a6aef8f: Download complete
    953361e8eaf6: Download complete
                                    
    That's it! My Media should now be running and you will be able to access it via any web browser on your network by browsing to http://ip_address_of_linux_computer:52051
  5. If you want to check the status of the My Media container, type the following:
    # sudo docker ps
    CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                                  NAMES
    e3f47b2ab1d9        bizmodeller/mymediaforalexa   "/bin/sh -c /opt/mym…"   11 seconds ago      Up 14 seconds       0.0.0.0:52050-52051->52050-52051/tcp   blissful_wiles
    
    This shows that the My Media container is running and has the id e3f47b2ab1d9
  6. To look at the My Media for Alexa log files, type the following (using the container ID from the step above):
    # sudo docker logs e3f47b2ab1d9
    
  7. To stop your new My Media container, type the following (using the container ID from the ps command above):
    # sudo docker stop e3f47b2ab1d9
    
  8. To restart your new My Media container, type the following (using the container ID from the ps command above):
    # sudo docker start e3f47b2ab1d9
    
  9. To delete your new My Media container, type the following (using the container ID from the ps command above):
    # sudo docker stop e3f47b2ab1d9
    # sudo docker rm e3f47b2ab1d9
    

Method 2: Download and Install Manually

Coming Soon...

Contact Us

Contact Us