docker-jdownloader-2 icon indicating copy to clipboard operation
docker-jdownloader-2 copied to clipboard

Can‘t install extra packages

Open mr-n0cturne opened this issue 2 years ago • 11 comments

Hi again :) I was too slow with answering the original topic so it has been closed.

Ive tried to install curl via environment variable INSTALL_PACKAGES=curl / INSTALL_EXTRA_PKGS=curl. Unfortunatelly without success:

[init        ] container is starting...
[cont-env    ] loading container environment variables...
[cont-env    ] APP_NAME: loading...
[cont-env    ] DISPLAY: executing...
[cont-env    ] DISPLAY: terminated successfully.
[cont-env    ] DISPLAY: loading...
[cont-env    ] DOCKER_IMAGE_PLATFORM: loading...
[cont-env    ] DOCKER_IMAGE_VERSION: loading...
[cont-env    ] GTK_THEME: executing...
[cont-env    ] GTK_THEME: terminated successfully.
[cont-env    ] GTK_THEME: loading...
[cont-env    ] HOME: loading...
[cont-env    ] INSTALL_PACKAGES_INTERNAL: executing...
[cont-env    ] INSTALL_PACKAGES_INTERNAL: terminated successfully.
[cont-env    ] INSTALL_PACKAGES_INTERNAL: loading...
[cont-env    ] QT_STYLE_OVERRIDE: executing...
[cont-env    ] QT_STYLE_OVERRIDE: terminated successfully.
[cont-env    ] QT_STYLE_OVERRIDE: loading...
[cont-env    ] TAKE_CONFIG_OWNERSHIP: loading...
[cont-env    ] XDG_CACHE_HOME: loading...
[cont-env    ] XDG_CONFIG_HOME: loading...
[cont-env    ] XDG_DATA_HOME: loading...
[cont-env    ] XDG_RUNTIME_DIR: loading...
[cont-env    ] container environment variables initialized.
[cont-secrets] loading container secrets...
[cont-secrets] container secrets loaded.
[cont-init   ] executing container initialization scripts...
[cont-init   ] 10-certs.sh: executing...
[cont-init   ] 10-certs.sh: terminated successfully.
[cont-init   ] 10-check-app-niceness.sh: executing...
[cont-init   ] 10-check-app-niceness.sh: terminated successfully.
[cont-init   ] 10-cjk-font.sh: executing...
[cont-init   ] 10-cjk-font.sh: terminated successfully.
[cont-init   ] 10-clean-logmonitor-states.sh: executing...
[cont-init   ] 10-clean-logmonitor-states.sh: terminated successfully.
[cont-init   ] 10-clean-tmp-dir.sh: executing...
[cont-init   ] 10-clean-tmp-dir.sh: terminated successfully.
[cont-init   ] 10-fontconfig-cache-dir.sh: executing...
[cont-init   ] 10-fontconfig-cache-dir.sh: terminated successfully.
[cont-init   ] 10-init-users.sh: executing...
[cont-init   ] 10-init-users.sh: terminated successfully.
[cont-init   ] 10-jwm.sh: executing...
[cont-init   ] 10-jwm.sh: terminated successfully.
[cont-init   ] 10-nginx.sh: executing...
[cont-init   ] 10-nginx.sh: terminated successfully.
[cont-init   ] 10-vnc-password.sh: executing...
[cont-init   ] 10-vnc-password.sh: terminated successfully.
[cont-init   ] 10-web-data.sh: executing...
[cont-init   ] 10-web-data.sh: terminated successfully.
[cont-init   ] 10-x11-unix.sh: executing...
[cont-init   ] 10-x11-unix.sh: terminated successfully.
[cont-init   ] 10-xdg-runtime-dir.sh: executing...
[cont-init   ] 10-xdg-runtime-dir.sh: terminated successfully.
[cont-init   ] 15-install-pkgs.sh: executing...
[cont-init   ] 15-install-pkgs.sh: installing requested package(s)...
[cont-init   ] 15-install-pkgs.sh: installing 'curl'...
[cont-init   ] 15-install-pkgs.sh: fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
[cont-init   ] 15-install-pkgs.sh: WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.16/main: temporary error (try again later)
[cont-init   ] 15-install-pkgs.sh: fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
[cont-init   ] 15-install-pkgs.sh: WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.16/community: temporary error (try again later)
[cont-init   ] 15-install-pkgs.sh: ERROR: unable to select packages:
[cont-init   ] 15-install-pkgs.sh:   curl (no such package):
[cont-init   ] 15-install-pkgs.sh:     required by: world[curl]
[cont-init   ] 15-install-pkgs.sh: terminated with error 1.

jdownloader2:
    image: jlesage/jdownloader-2:latest
    container_name: jdownloader2
    hostname: bf-srvddl
    restart: always
    mem_limit: 4096m
    cpus: 2.0
    volumes:
      - /share/CACHEDEV1_DATA/Container/jdownloader/config:/config
      - /share/Downloads/jdownloader:/output
    mac_address: 24:5E:BE:00:00:43
    environment:
      - TZ=Europe/Berlin
      - INSTALL_EXTRA_PKGS=curl
    dns:
      - 192.168.42.254
      - 1.1.1.1
      - 1.0.0.1
    networks:
      myBridgeNet:
        ipv4_address: 192.168.42.43

networks:
  myBridgeNet:
    driver: qnet
    driver_opts:
      iface: "eth2"
    ipam:
      driver: qnet
      options:
        iface: "eth2"
      config:
        - subnet: 192.168.42.0/24
          gateway: 192.168.42.254

Originally posted by @bfrohn85 in https://github.com/jlesage/docker-jdownloader-2/issues/115#issuecomment-1324739651

mr-n0cturne avatar Nov 23 '22 18:11 mr-n0cturne

Do you have the same issue if you use the default bridge network? You can try to run the following command to confirm:

docker run --rm -ti -e INSTALL_EXTRA_PKGS=curl jlesage/jdownloader-2

jlesage avatar Nov 23 '22 19:11 jlesage

This command works. But I'm a little bit confused because jdownloader has internet access.

mr-n0cturne avatar Nov 24 '22 12:11 mr-n0cturne

For some reason when using your myBridgeNet network the container has trouble reaching the Alpine package repository. You you have any proxy, firewall rules, etc that could interfere ?

jlesage avatar Nov 24 '22 13:11 jlesage

No, outgoing is everything open - no proxy, no firewall.

mr-n0cturne avatar Nov 24 '22 14:11 mr-n0cturne

I've connected to the conainer without INSTALL_EXTRA_PKGS via ssh.

This is what I've got. Basically the repos are reachable for the container/alpine linux.

/tmp # wget -S --spider https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
Connecting to dl-cdn.alpinelinux.org (151.101.194.133:443)
  HTTP/1.1 200 OK
  Connection: close
  Content-Length: 655754
  Content-Security-Policy: script-src 'self'
  Content-Type: application/octet-stream
  Etag: "637bf5e8-a018a"
  Last-Modified: Mon, 21 Nov 2022 22:04:24 GMT
  Referrer-Policy: origin-when-cross-origin
  Server: nginx/1.23.1
  Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
  X-Content-Type-Options: nosniff
  X-Frame-Options: DENY
  Via: 1.1 varnish, 1.1 varnish
  Accept-Ranges: bytes
  Date: Thu, 24 Nov 2022 14:21:19 GMT
  Age: 14
  X-Served-By: cache-ams12752-AMS, cache-fra-eddf8230110-FRA
  X-Cache: HIT, HIT
  X-Cache-Hits: 13, 1
  X-Timer: S1669299679.178352,VS0,VE5
  Vary: Origin
remote file exists


/tmp # wget -S --spider https://dl-cdn.alpinelinux.org/alpine/v3.16/main
Connecting to dl-cdn.alpinelinux.org (151.101.194.133:443)
  HTTP/1.1 301 Moved Permanently
  Connection: close
  Content-Length: 169
  Content-Security-Policy: script-src 'self'
  Content-Type: text/html
  Location: http://dl-cdn.alpinelinux.org/alpine/v3.16/main/
Connecting to dl-cdn.alpinelinux.org (151.101.194.133:80)
  HTTP/1.1 200 OK
  Connection: close
  Content-Security-Policy: script-src 'self'
  Content-Type: text/html
  Referrer-Policy: origin-when-cross-origin
  Server: nginx/1.23.1
  Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
  X-Content-Type-Options: nosniff
  X-Frame-Options: DENY
  Via: 1.1 varnish, 1.1 varnish
  Accept-Ranges: bytes
  Date: Thu, 24 Nov 2022 14:21:34 GMT
  Age: 0
  X-Served-By: cache-ams21057-AMS, cache-fra-eddf8230122-FRA
  X-Cache: MISS, MISS
  X-Cache-Hits: 0, 0
  X-Timer: S1669299695.902512,VS0,VE11
  Vary: Origin
  transfer-encoding: chunked
remote file exists



/tmp # wget -S --spider https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
Connecting to dl-cdn.alpinelinux.org (151.101.2.133:443)
  HTTP/1.1 200 OK
  Connection: close
  Content-Length: 1809648
  Content-Security-Policy: script-src 'self'
  Content-Type: application/octet-stream
  Etag: "637b75ac-1b9cf0"
  Last-Modified: Mon, 21 Nov 2022 12:57:16 GMT
  Referrer-Policy: origin-when-cross-origin
  Server: nginx/1.23.1
  Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
  X-Content-Type-Options: nosniff
  X-Frame-Options: DENY
  Via: 1.1 varnish, 1.1 varnish
  Accept-Ranges: bytes
  Date: Thu, 24 Nov 2022 14:21:50 GMT
  Age: 11
  X-Served-By: cache-ams12726-AMS, cache-hhn4020-HHN
  X-Cache: HIT, HIT
  X-Cache-Hits: 13, 1
  X-Timer: S1669299711.854126,VS0,VE2
  Vary: Origin
remote file exists



/tmp # wget -S --spider https://dl-cdn.alpinelinux.org/alpine/v3.16/community
Connecting to dl-cdn.alpinelinux.org (151.101.2.133:443)
  HTTP/1.1 301 Moved Permanently
  Connection: close
  Content-Length: 169
  Content-Security-Policy: script-src 'self'
  Content-Type: text/html
  Location: http://dl-cdn.alpinelinux.org/alpine/v3.16/community/
Connecting to dl-cdn.alpinelinux.org (151.101.2.133:80)
  HTTP/1.1 200 OK
  Connection: close
  Content-Security-Policy: script-src 'self'
  Content-Type: text/html
  Referrer-Policy: origin-when-cross-origin
  Server: nginx/1.23.1
  Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
  X-Content-Type-Options: nosniff
  X-Frame-Options: DENY
  Via: 1.1 varnish, 1.1 varnish
  Accept-Ranges: bytes
  Date: Thu, 24 Nov 2022 14:22:07 GMT
  Age: 0
  X-Served-By: cache-ams21040-AMS, cache-hhn4046-HHN
  X-Cache: MISS, MISS
  X-Cache-Hits: 0, 0
  X-Timer: S1669299727.097672,VS0,VE14
  Vary: Origin
  transfer-encoding: chunked
remote file exists

mr-n0cturne avatar Nov 24 '22 14:11 mr-n0cturne

Are you able to install manually the package inside the container via add-pkg curl?

jlesage avatar Nov 24 '22 14:11 jlesage

Yes, that works

/tmp # add-pkg curl
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
(1/3) Installing nghttp2-libs (1.47.0-r0)
(2/3) Installing libcurl (7.83.1-r4)
(3/3) Installing curl (7.83.1-r4)
Executing busybox-1.35.0-r17.trigger
OK: 195 MiB in 128 packages
/tmp # 
/tmp # which curl
/usr/bin/curl

mr-n0cturne avatar Nov 24 '22 14:11 mr-n0cturne

Ok, and if you put back the INSTALL_EXTRA_PKGS variable it still doesn't work ?

jlesage avatar Nov 24 '22 14:11 jlesage

No, it doesn't work. :(

mr-n0cturne avatar Nov 24 '22 14:11 mr-n0cturne

What is the default mode for myBridgeNet? DHCP or static ? Is it possible that the container obtains its IP via DHCP and that the IP address is not received yet at the moment of the package installation ?

jlesage avatar Nov 24 '22 14:11 jlesage

BTW a qnet network seems to be something specific to QNAP, so I cannot reproduce on my side...

jlesage avatar Nov 24 '22 14:11 jlesage

Closing this issue. Please re-open is needed.

jlesage avatar Jul 29 '24 17:07 jlesage