Announcement

Collapse
No announcement yet.

NxFilter Docker Build 'exec /bin/sh:exec format error'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NxFilter Docker Build 'exec /bin/sh:exec format error'

    I use NxFilter on a Raspberry Pi 4. I had done an update to 'Bullseye' it totally borked my NxFilter instance for some reason. I started over from scratch, and decided to run NxFilter this time on a docker instance on the Pi. I went to the github page referenced in the tutorials, installed Docker. I got some error just running the "transient container with persistent data volumes" docker commands:

    docker run -dt \ --name nxfilter \ --restart unless-stopped \ -v nxfilter-conf:/nxfilter/conf \ -v nxfilter-log:/nxfilter/log \ -v nxfilter-db:/nxfilter/db \ -p 80:80 -p 443:443 -p 53:53/udp \ -p 19002-19004:19002-19004 \ packetworks/nxfilter-base:latest

    Well, not an error, the container was perpetually in 'restarting' status. So, cloned the repo, copied the dockfile, and then tried to do the "docker image build" command. Here's the results:


    Sending build context to Docker daemon 46.93MB
    Step 1/14 : FROM 1science/java: oracle-jre-8
    ---> fb375357ddef
    Step 2/14 : MAINTAINER Charles Gunzelman "cgunzelman@gmail.com"
    ---> Using cache
    ---> 723069c82d0a
    Step 3/14 : LABEL org.label-schema.docker.dockerfile="/Dockerfile" org.label-schema.vcs-type="Git" org.label-schema.vcs-url="https://github.com/packetworks/docker-nxfilter"
    ---> Using cache
    ---> 43d392d4a40c
    Step 4/14 : COPY --from=vimagick/sslsplit /usr/local/bin/sslsplit /usr/local/bin/
    ---> Using cache
    ---> 660e62c2a7e1
    Step 5/14 : COPY entrypoint.sh url.txt /
    ---> Using cache
    ---> 2be94c65d7b6
    Step 6/14 : RUN xargs </url.txt curl -o nxfilter.zip -s && mkdir /nxfilter && unzip nxfilter.zip -d /nxfilter && chmod +x /nxfilter/bin/startup.sh && rm -f nxfilter.zip
    ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
    ---> Running in f2e0bfb3f47d
    exec /bin/sh: exec format error
    The command '/bin/sh -c xargs </url.txt curl -o nxfilter.zip -s && mkdir /nxfilter && unzip nxfilter.zip -d /nxfilter && chmod +x /nxfilter/bin/startup.sh && rm -f nxfilter.zip' returned a non-zero code: 1


    The container runs but I cant do anything with it. I checked the "Dockerfile" and there doesn't seem to any issue. The entrypoint.sh script seemed odd but it has the shebang, it also looks like it commented things out, I tried to remove that and fix it but that didn't change anything:

    #!/bin/sh

    #if [ ! -f "/nxfilter/conf/cfg.default" ]; then
    # cp - a /nxfilter/conf-default/. nxfilter/conf/
    #fi
    exec "$@"


    There seems to be plenty of people getting the docker file to work proper. What is it that I need to do to get this running?
    Last edited by rllamas; 05-14-2022, 07:21 PM.

  • #2
    I will ask Charles who is the writer of the Docker file.

    Comment


    • #3
      In the past this was caused by the Pi trying to pull the image for another architecture. We fixed that by building a separate image for ARM and then with a multi-arch build on latest. I will have to look into what's causing it now. My first guess is something changed with how Docker handles Manifests and the base image being old.

      For now, can you try the :debian tag? Interested to know if that helps.

      It would be:
      packetworks/nxfilter-base:debian

      Can you also try
      Code:
      docker manifest inspect --verbose packetworks/nxfilter-base:latest
      to see what the manifest on latest tag says?
      Last edited by cgunzelman; 05-19-2022, 10:54 AM.

      Comment


      • #4
        Rob is working on a new Docker image based on Ubuntu Linux. It will be our official Docker image for NxFilter.

        Comment


        • #5
          New Docker images are here, https://github.com/DeepWoods

          It's Rob Ahser's Github page. Rob has been working as a tech-support guy for the NxFilter users in USA. He built his Docker images for NxFilter and NxCloud based on Ubuntu Linux.

          Comment


          • #6
            Hey all,

            I haven't given up on this project for me. I just used the service on the Raspberry Pi direct instead of a container for now. It works and I'm okay with it, I just want to use a container service. I'm almost done with my degree and work full time so I haven't been able to devote time to this project lately. I appreciate your answers so far.

            The command:
            docker manifest inspect --verbose packetworks/nxfilter-base:latest

            gives me a lot of JSON:
            {
            "Ref": "docker.io/packetworks/nxfilter-base:latest@sha256:f614daea1dbef579789fc89ba49a7d4 051680b68015174516cb74b1512ebd177",
            "Descriptor": {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "digest": "sha256:f614daea1dbef579789fc89ba49a7d4051680b 6801 5174516cb74b1512ebd177",
            "size": 2411,
            "platform": {
            "architecture": "amd64",
            "os": "linux"
            }

            }
            }

            Nothing referring to 'manifest' besides "v2+json" I may be misunderstanding something though. There's the SHA256 hash there.

            I saw the new docker images, I'll try those out when I get more time.

            Again, I really appreciate your time!

            Comment


            • #7
              Yeah, use the new one. I tried it on my Linux system, it worked fine.

              Comment

              Working...
              X