ReproNim / neurodocker

Generate custom Docker and Singularity images, and minimize existing containers
https://www.repronim.org/neurodocker/
Apache License 2.0
325 stars 97 forks source link

jq from source fails #590

Open Remi-Gau opened 8 months ago

Remi-Gau commented 8 months ago
#5 [1/3] FROM docker.io/library/fedora:36@sha256:64cd00a0e2b92d527c0a0954162a73e85f160e3a53c38325b51e87d6aab4e266
#5 resolve docker.io/library/fedora:36@sha256:64cd00a0e2b92d527c0a0954162a73e85f160e3a53c38325b51e87d6aab4e266 done
#5 sha256:1d81a0524f7d02b7673be0eb1201ab507468b736188d2678a488aeb3449d266e 1.99kB / 1.99kB done
#5 sha256:c7bef7d09442a4c4deef8e8120027e7fa3f163c7b5a0afedc3f2c4c2e7652e1c 12.58MB / 60.07MB 0.1s
#5 sha256:64cd00a0e2b92d527c0a0954162a73e85f160e3a53c38325b51e87d6aab4e266 975B / 975B done
#5 sha256:c3928ce4e65d6d1e66fc1e2c9b1cc163d31bc63a96117d9a76a8e4fe702eb2bd 529B / 529B done
#5 sha256:c7bef7d09442a4c4deef8e8120027e7fa3f163c7b5a0afedc3f2c4c2e7652e1c 41.94MB / 60.07MB 0.4s
#5 sha256:c7bef7d09442a4c4deef8e8120027e7fa3f163c7b5a0afedc3f2c4c2e7652e1c 59.84MB / 60.07MB 0.5s
#5 sha256:c7bef7d09442a4c4deef8e8120027e7fa3f163c7b5a0afedc3f2c4c2e7652e1c 60.07MB / 60.07MB 0.6s done
#5 extracting sha256:c7bef7d09442a4c4deef8e8120027e7fa3f163c7b5a0afedc3f2c4c2e7652e1c 0.1s
#5 extracting sha256:c7bef7d09442a4c4deef8e8120027e7fa3f163c7b5a0afedc3f2c4c2e7652e1c 2.2s done
#5 DONE 2.8s

#6 [2/3] RUN mkdir jq     && cd jq     && curl -fsSL https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz     | tar xz --strip-components 1     && ./configure --disable-maintainer-mode     && make     && make install
#6 0.595 checking for a BSD-compatible install... /usr/bin/install -c
#6 0.603 checking whether build environment is sane... yes
#6 0.612 checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
#6 0.614 checking for gawk... gawk
#6 0.614 checking whether make sets $(MAKE)... no
#6 0.622 checking whether make supports nested variables... no
#6 0.628 checking whether make supports nested variables... (cached) no
#6 0.630 checking for style of include used by make... none
#6 0.633 checking for gcc... no
#6 0.633 checking for cc... no
#6 0.634 checking for cl.exe... no
#6 0.634 configure: error: in `/jq':
#6 0.634 configure: error: no acceptable C compiler found in $PATH
#6 0.634 See `config.log' for more details
#6 ERROR: process "/bin/sh -c mkdir jq     && cd jq     && curl -fsSL https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz     | tar xz --strip-components 1     && ./configure --disable-maintainer-mode     && make     && make install" did not complete successfully: exit code: 1
------
 > [2/3] RUN mkdir jq     && cd jq     && curl -fsSL https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz     | tar xz --strip-components 1     && ./configure --disable-maintainer-mode     && make     && make install:
no
0.628 checking whether make supports nested variables... (cached) no
0.630 checking for style of include used by make... none
0.633 checking for gcc... no
0.633 checking for cc... no
0.634 checking for cl.exe... no
0.634 configure: error: in `/jq':
0.634 configure: error: no acceptable C compiler found in $PATH
0.634 See `config.log' for more details
------
Dockerfile_tmp:4
--------------------
   3 |     FROM fedora:36
   4 | >>> RUN mkdir jq \
   5 | >>>     && cd jq \
   6 | >>>     && curl -fsSL https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz \
   7 | >>>     | tar xz --strip-components 1 \
   8 | >>>     && ./configure --disable-maintainer-mode \
   9 | >>>     && make \
  10 | >>>     && make install
  11 |     
kaczmarj commented 8 months ago

hmm something is wrong with how the template is being rendered. the jq template specifies dependencies like gcc and make, but that 'apt install' command isn't being added to the dockerfile... did anything change recently that could cause this?

here is the "source" portion of the jq template https://github.com/ReproNim/neurodocker/blob/1a3b49dc6de71fedea503b1d922088d195c426c3/neurodocker/templates/jq.yaml#L21-L50

command to reproduce issue:

sudo docker run --rm repronim/neurodocker:latest generate docker -p apt -b debian --jq version=1.6 method=source

resulting dockerfile (doesn't include an apt-get install section for gcc and make etc.

# Generated by Neurodocker and Reproenv.

FROM debian
RUN mkdir jq \
    && cd jq \
    && curl -fsSL https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz \
    | tar xz --strip-components 1 \
    && autoreconf -fi \
    && ./configure --disable-maintainer-mode \
    && make \
    && make install

# Save specification to JSON.
RUN printf '{ \
  "pkg_manager": "apt", \
  "existing_users": [ \
    "root" \
  ], \
  "instructions": [ \
    { \
      "name": "from_", \
      "kwds": { \
        "base_image": "debian" \
      } \
    }, \
    { \
      "name": "run", \
      "kwds": { \
        "command": "mkdir jq\\ncd jq\\ncurl -fsSL https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz \\\\\\n| tar xz --strip-components 1\\nautoreconf -fi \\n./configure --disable-maintainer-mode\\nmake\\nmake install" \
      } \
    } \
  ] \
}' > /.reproenv.json
# End saving to specification to JSON.