muety / anchr

⚓️ Anchr provides you with a toolbox for tiny tasks on the internet, especially bookmark collections
https://anchr.io
GNU General Public License v3.0
278 stars 27 forks source link

Docker installation has missing dependencies #66

Closed NateTheSage closed 1 year ago

NateTheSage commented 1 year ago

Just found this the other day and wanted to give it a try, but it appears the docker build instructions have had something go the way of the dinosaur.

Building anchr
Step 1/14 : FROM node:12-alpine
 ---> bb6d28039b8c
Step 2/14 : MAINTAINER Ferdinand Mütsch <ferdinand@muetsch.io>
 ---> Using cache
 ---> fe282418b13d
Step 3/14 : WORKDIR /app
 ---> Using cache
 ---> 418f7104aeea
Step 4/14 : COPY app /app/app/
 ---> Using cache
 ---> 06624bf07085
Step 5/14 : COPY config /app/config/
 ---> Using cache
 ---> 515647601f6a
Step 6/14 : COPY lib /app/lib/
 ---> Using cache
 ---> 9f3a6075cff7
Step 7/14 : COPY public /app/public/
 ---> Using cache
 ---> b9bf8f71a943
Step 8/14 : COPY *.js /app/
 ---> Using cache
 ---> 244fe066f6ba
Step 9/14 : COPY *.json /app/
 ---> Using cache
 ---> 79b2dfba85d5
Step 10/14 : VOLUME [ "/app/data" ]
 ---> Using cache
 ---> eefc3b94ad48
Step 11/14 : RUN apk update && apk upgrade &&     apk add --no-cache bash git openssh
 ---> Using cache
 ---> ae8d0de1a28e
Step 12/14 : RUN npm install -g bower
 ---> Using cache
 ---> 096b7db43289
Step 13/14 : RUN npm install &&     cd public &&     bower install --allow-root &&     cd .. &&     npm run build &&     mkdir -p /var/log/anchr
 ---> Running in 5db7d5acbab3
npm WARN deprecated grunt-filerev@2.3.1: Deprecated
npm WARN deprecated grunt-ng-annotate@4.0.0: grunt-ng-annotate is deprecated. Switch to babel-plugin-angularjs-annotate or provide annotations by yourself.
npm WARN deprecated time-grunt@2.0.0: Deprecated because Grunt is practically unmaintained. Move on to something better. This package will continue to work with Grunt v1, but it will not receive any updates.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated bower@1.8.8: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! code 1
npm ERR! Command failed: git checkout 14.0.1
npm ERR! error: pathspec '14.0.1' did not match any file(s) known to git
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-04-19T00_48_55_929Z-debug.log
ERROR: Service 'anchr' failed to build : The command '/bin/sh -c npm install &&     cd public &&     bower install --allow-root &&     cd .. &&     npm run build &&     mkdir -p /var/log/anchr' returned a non-zero code: 1

Even after sourcing the env, it still fails.

Happy to contribute more logs if needed. :)

NateTheSage commented 1 year ago

Ended up digging around, found a couple of things:

prom-client in package.json needs to be changed to include a v, I was able to get mine to compile using:

"prom-client": "https://github.com/siimon/prom-client#v14.0.1",

And in bower.json, there are no releases anymore, so it's easier to just grab the repo:

"bootstrap-material-design": "git://github.com/FezVrasta/bootstrap-material-design.git",

I can make a pull request with these changes if you'd like.

muety commented 1 year ago

Thanks for bringing this up. I fixed this and also updated a couple of dependencies along the way. But I feel like the older the project is growing, the harder it gets to keep it alive.