acobaugh / shinobi-docker

A custom docker build for Shinobi
19 stars 14 forks source link

apk: unrecognized option: virtual #9

Open johncadengo opened 3 years ago

johncadengo commented 3 years ago

Here's the log when I tried running docker-compose up -d

(1/58) Installing binutils (2.33.1-r0)
(2/58) Installing libmagic (5.37-r1)
(3/58) Installing file (5.37-r1)
(4/58) Installing isl (0.18-r0)
(5/58) Installing libgomp (9.3.0-r0)
(6/58) Installing libatomic (9.3.0-r0)
(7/58) Installing mpfr4 (4.0.2-r1)
(8/58) Installing mpc1 (1.1.0-r1)
(9/58) Installing gcc (9.3.0-r0)
(10/58) Installing musl-dev (1.1.24-r3)
(11/58) Installing libc-dev (0.7.2-r0)
(12/58) Installing g++ (9.3.0-r0)
(13/58) Installing make (4.2.1-r2)
(14/58) Installing fortify-headers (1.1-r0)
(15/58) Installing build-base (0.5-r1)
(16/58) Installing libattr (2.4.48-r0)
(17/58) Installing coreutils (8.31-r0)
(18/58) Installing nasm (2.14.02-r0)
(19/58) Installing gdbm (1.13-r1)
(20/58) Installing readline (8.0.1-r0)
(21/58) Installing sqlite-libs (3.30.1-r2)
(22/58) Installing python2 (2.7.18-r0)
(23/58) Installing pkgconf (1.6.3-r0)
(24/58) Installing zlib-dev (1.2.11-r3)
(25/58) Installing libpng-dev (1.6.37-r1)
(26/58) Installing freetype-dev (2.10.1-r1)
(27/58) Installing gnutls-c++ (3.6.15-r0)
(28/58) Installing libgmpxx (6.1.2-r1)
(29/58) Installing gmp-dev (6.1.2-r1)
(30/58) Installing nettle-dev (3.5.1-r0)
(31/58) Installing libtasn1-dev (4.15.0-r0)
(32/58) Installing p11-kit-dev (0.23.18.1-r1)
(33/58) Installing gnutls-dev (3.6.15-r0)
(34/58) Installing lame-dev (3.100-r0)
(35/58) Installing enca (1.19-r1)
(36/58) Installing enca-dev (1.19-r1)
(37/58) Installing expat-dev (2.2.9-r1)
(38/58) Installing libblkid (2.34-r1)
(39/58) Installing libfdisk (2.34-r1)
(40/58) Installing libmount (2.34-r1)
(41/58) Installing libsmartcols (2.34-r1)
(42/58) Installing util-linux-dev (2.34-r1)
(43/58) Installing fontconfig-dev (2.13.1-r2)
(44/58) Installing fribidi-dev (1.0.8-r0)
(45/58) Installing libass-dev (0.14.0-r0)
(46/58) Installing libogg-dev (1.3.4-r0)
(47/58) Installing libtheora-dev (1.1.1-r14)
(48/58) Installing libvorbis-dev (1.3.6-r2)
(49/58) Installing libvpx-dev (1.8.1-r0)
(50/58) Installing libwebp (1.0.3-r0)
(51/58) Installing libwebp-dev (1.0.3-r0)
(52/58) Installing opus-dev (1.3.1-r0)
(53/58) Installing librtmp (2.4_git20160909-r7)
(54/58) Installing rtmpdump-dev (2.4_git20160909-r7)
(55/58) Installing x264-dev (20191119-r0)
(56/58) Installing x265-dev (3.2.1-r0)
(57/58) Installing yasm-dev (1.3.0-r2)
(58/58) Installing .build-dependencies (20210223.051738)
Executing busybox-1.31.1-r9.trigger
OK: 343 MiB in 133 packages
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
+ npm@7.5.6
added 59 packages from 24 contributors, removed 241 packages and updated 194 packages in 10.038s
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)

added 202 packages, and audited 203 packages in 7s

10 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm WARN deprecated webdav@1.6.1: WebDAV 1.x is critically out of date and unsupported: Please upgrade to v4.

added 537 packages, and audited 538 packages in 15s

15 vulnerabilities (6 low, 1 moderate, 8 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm WARN EBADENGINE Unsupported engine { package: 'discord.js@12.5.1',
npm WARN EBADENGINE   required: { node: '>=12.0.0' },
npm WARN EBADENGINE   current: { node: 'v10.23.3', npm: '7.5.6' } }

up to date, audited 538 packages in 2s

15 vulnerabilities (6 low, 1 moderate, 8 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
apk: unrecognized option: virtual
apk-tools 2.10.5, compiled for x86_64.

usage: apk del [-h|--help] [-p|--root DIR]
           [-X|--repository REPO] [-q|--quiet]
           [-v|--verbose] [-i|--interactive]
           [-V|--version] [-f|--force]
           [--force-binary-stdout]
           [--force-broken-world]
           [--force-non-repository]
           [--force-old-apk] [--force-overwrite]
           [--force-refresh] [-U|--update-cache]
           [--progress] [--progress-fd FD]
           [--no-progress] [--purge]
           [--allow-untrusted] [--wait TIME]
           [--keys-dir KEYSDIR]
           [--repositories-file REPOFILE]
           [--no-network] [--no-cache]
           [--cache-dir CACHEDIR]
           [--cache-max-age AGE] [--arch ARCH]
           [--print-arch] [-s|--simulate]
           [--clean-protected]
           [--overlay-from-stdin] [--no-scripts]
           [--no-commit-hooks]
           [--initramfs-diskless-boot]
           [-r|--rdepends] PACKAGE...

Description:
  Remove PACKAGEs from 'world' and uninstall them

Global options:
  -h, --help              Show generic help or
                          applet specific help
  -p, --root DIR          Install packages to DIR
  -X, --repository REPO   Use packages from REPO
  -q, --quiet             Print less information
  -v, --verbose           Print more information
                          (can be doubled)
  -i, --interactive       Ask confirmation for
                          certain operations
  -V, --version           Print program version
                          and exit
  -f, --force             Enable selected
                          --force-* (deprecated)
  --force-binary-stdout   Continue even if binary
                          data is to be output
  --force-broken-world    Continue even if
                          'world' cannot be
                          satisfied
  --force-non-repository  Continue even if
                          packages may be lost on
                          reboot
  --force-old-apk         Continue even if
                          packages use
                          unsupported features
  --force-overwrite       Overwrite files in
                          other packages
  --force-refresh         Do not use cached files
                          (local or from proxy)
  -U, --update-cache      Alias for
                          --cache-max-age 1
  --progress              Show a progress bar
  --progress-fd FD        Write progress to fd
  --no-progress           Disable progress bar
                          even for TTYs
  --purge                 Delete also modified
                          configuration files
                          (pkg removal) and
                          uninstalled packages
                          from cache (cache
                          clean)
  --allow-untrusted       Install packages with
                          untrusted signature or
                          no signature
  --wait TIME             Wait for TIME seconds
                          to get an exclusive
                          repository lock before
                          failing
  --keys-dir KEYSDIR      Override directory of
                          trusted keys
  --repositories-file REPOFILE Override
                          repositories file
  --no-network            Do not use network
                          (cache is still used)
  --no-cache              Do not use any local
                          cache path
  --cache-dir CACHEDIR    Override cache
                          directory
  --cache-max-age AGE     Maximum AGE (in
                          minutes) for index in
                          cache before refresh
  --arch ARCH             Use architecture with
                          --root
  --print-arch            Print default arch and
                          exit

Commit options:
  -s, --simulate          Show what would be done
                          without actually doing
                          it
  --clean-protected       Do not create .apk-new
                          files in configuration
                          dirs
  --overlay-from-stdin    Read list of overlay
                          files from stdin
  --no-scripts            Do not execute any
                          scripts
  --no-commit-hooks       Skip pre/post hook
                          scripts (but not other
                          scripts)
  --initramfs-diskless-boot Enables options for
                          diskless initramfs boot
                          (e.g. skip hooks)

Delete options:
  -r, --rdepends          Recursively delete all
                          top-level reverse
                          dependencies too

This apk has coffee making abilities.
The command '/bin/sh -c apk add --virtual .build-dependencies --no-cache   build-base   coreutils   nasm   python   make   pkgconfig   wget   freetype-dev   gnutls-dev   lame-dev   libass-dev   libogg-dev   libtheora-dev   libvorbis-dev   libvpx-dev   libwebp-dev   opus-dev   rtmpdump-dev   x264-dev   x265-dev   yasm-dev  && wget -q "https://gitlab.com/Shinobi-Systems/Shinobi/-/archive/$SHINOBI_BRANCH/Shinobi-$SHINOBI_BRANCH.tar.bz2?sha=$SHINOBI_SHA" -O /tmp/shinobi.tar.bz2  && tar -xjpf /tmp/shinobi.tar.bz2 -C /tmp/shinobi  && mv /tmp/shinobi/Shinobi-$SHINOBI_BRANCH /opt/shinobi  && rm -f /tmp/shinobi.tar.bz2  && cd /opt/shinobi  && npm i npm@latest -g  && npm install pm2 -g  && npm install  && npm install discord.js  && apk del --virtual .build-dependencies' returned a non-zero code: 1
ERROR: Service 'shinobi' failed to build
Aleksahek commented 2 years ago

---> Running in 6d00e1e00bb3 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz ERROR: unable to select packages: python (no such package): required by: .build-dependencies-20220927.190231[python] The command '/bin/sh -c apk add --virtual .build-dependencies --no-cache build-base coreutils nasm python make pkgconfig wget freetype-dev gnutls-dev lame-dev libass-dev libogg-dev libtheora-dev libvorbis-dev libvpx-dev libwebp-dev opus-dev rtmpdump-dev x264-dev x265-dev yasm-dev && wget -q "https://gitlab.com/Shinobi-Systems/Shinobi/-/archive/$SHINOBI_BRANCH/Shinobi-$SHINOBI_BRANCH.tar.bz2?sha=$SHINOBI_SHA" -O /tmp/shinobi.tar.bz2 && tar -xjpf /tmp/shinobi.tar.bz2 -C /tmp/shinobi && mv /tmp/shinobi/Shinobi-$SHINOBI_BRANCH /opt/shinobi && rm -f /tmp/shinobi.tar.bz2 && cd /opt/shinobi && npm i npm@latest -g && npm install pm2 -g && npm install && apk del --virtual .build-dependencies' returned a non-zero code: 2

thomas-merzenich commented 1 year ago

Hi! Does anyone find a solution?

karambir commented 1 year ago

In Dockerfile, change python where it is installing packages RUN apk add --virtual .build-dependencies to python3.

But it still won't build as it fails at npm installation. Image is using nodejs 12 but trying to install npm i npm@latest, it will complain. So you have to install a specific npm version which works with node12. You might another roadblock with pm2 being too new too.