monocle-gateway: No such file or directory

  • Hello,

    I tried to install monocle into an alpine linux by:

    # ---------------------------------------
    # Create Monocle Gateway configuration 
    # directory
    # ---------------------------------------
    RUN mkdir -p /etc/monocle
    RUN mkdir -p /share/monocle
    RUN mkdir -p /tmp/monocle
    RUN ls -s /etc/monocle /share/monocle
    # ---------------------------------------
    # Install Monocle Gateway dependencies
    # and other useful utilties
    # ---------------------------------------
    RUN apk update &&      \
        apk add --no-cache \
        wget               \
        curl               \
        libstdc++          \
        nano               \
        net-tools          \
        openssl            \
    # ---------------------------------------
    # Download versioned Monocle Gateway
    # build archive file
    # - - - - - - - - - - - - - - - - - - - -
    # Extract Moncole Gateway related 
    # executables to the appropriate 
    # runtime directories 
    # - - - - - - - - - - - - - - - - - - - -
    # Remove the downloaded Monocle Gateway 
    # archive files
    # ---------------------------------------
    RUN wget -c -O /tmp/monocle/monocle-gateway.tar.gz && \
        cd /usr/local/bin/ && \
        tar xvzf /tmp/monocle/monocle-gateway.tar.gz monocle-gateway && \ 
        tar xvzf /tmp/monocle/monocle-gateway.tar.gz monocle-proxy  && \
        rm -Rf /tmp/monocle/
    # ---------------------------------------
    # Expose required TCP ports 
    # (port 443 is required by Amazon for 
    # secure connectivity)
    # ---------------------------------------
    EXPOSE 443/tcp
    # ---------------------------------------
    # Expose required UDP ports 
    # (used for the @proxy method to allow 
    # IP cameras to transmit streams via UDP)
    # ---------------------------------------
    EXPOSE 62000-62100/udp
    COPY /
    RUN chmod +x /
    ENTRYPOINT ["/bin/bash", "-c", "/"]

    If I try to run by

    /usr/local/bin/monocle-gateway --tail

    I get monocle-gateway: No such file or directory - Where is my mistake or can anyone confirm that?

    Thanks, Thomas

  • @tringler

    We have a Docker image pre-built (based on Alpine) it you want to use it.

    And here is our Dockerfile:

    Just doing a cursory comparison, I think the TAR.GZ you are downloading is not compiled for Alpine but rather Debian/Ubuntu distros.

    Our Docker file is pulling this archive instead: “monocle-gateway-alpine-x64-0.0.4.tar.gz” – (for x64 rather than ARM. however)

    Thanks, Robert

  • It looks like we are currently only building “x64” binaries for Alpine distros.


  • Thanks! Understood. Would it be possible to compile it for other architectures as well for alpine or should I use the linux binaries with i.e. an ubuntu base image? It is even possible to compile it by my own?

    For my use case I need to build my own Docker images to use it as plugin - Repo:


    Regards, Thomas

  • @tringler

    The binaries are not currently open source and the build can be a bit complicated/convoluted. However, I’d be happy to try and help and get distributions compiled for whatever platforms/distributions are needed for

    Looking at the arch property of config.json example on this page:

    "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],

    So maybe we need Alpine images for at least “i386”, “armv7” and “aarch64”?
    “armhf” is pretty old at this point and I’m not sure if we can compile for that or would want to add support for it.

    The tricky part for any Docker instance is the networking. The Monocle Gateway must be able to listen on port 443 and must be able to access the IP cameras on the user’s private network.
    (see Networking Considerations:

    Before we move forward on all that work, lets make sure we can get it fully working as a plugin/add-on first. So, like you suggested, lets just start with an “Ubuntu” base image in the Docker image for the add-on. The “apk” commands will have to be replaced with “apt” for ubuntu. But the rest looks like it should work for an Ubuntu docker image.

    Thanks, Robert

  • Thanks for your support! I will try it with Ubuntu on armv7 architecture and host networking. If its working I can improve it by switching the base image to alpine and/or try it with bridge networking.

  • @tringler

    Let me know how it goes. I’ve started the process to get the underlying binaries compiling for Alpine for the various ARM builds. Still a work in progress …

    Thanks, Robert

  • @Monocle

    Hi Robert,

    have you compiled Alpine binaries for the various ARM builds?

    I’m also interested in Hassio addon developement…


  • @sdesalve

    I did start this process but I’m not in my office right now and don’t remember exactly how far I got. Let me check on it Monday and see where I left off.

    Thanks, Robert

  • @Monocle thanks

  • Hi Robert

    have you compiled Alpine binaries for the various ARM builds?

    Sorry for my solicitation

  • I’ve developed my Monocle Cam Gateway addon…

    It will run on x64 Hassio installations

  • @sdesalve

    That’s great! Sorry for missing your last posts — My attention has been taken away from this project due to personal/family reasons … what can I say, its 2020 and this year has been a disaster. However, I plan to resume work on this project at the beginning of the year and hopefully I can revisit the Alpine binaries compilation.

    Thanks, Robert

Log in to reply