tcosolutions / betterscan

Code Scanning/SAST/Static Analysis/Linting using many tools/Scanners with One Report (Code, IaC) - Betterscan
https://betterscan.io
GNU Affero General Public License v3.0
818 stars 90 forks source link

Issue building docker images #166

Closed heiglandreas closed 5 months ago

heiglandreas commented 5 months ago

Due to the docker-hub images not being available (see #161) I tried to use the build information in the docker folder.

Running docker compose build results in this error:

...
7.291 mkdir -p newBuild/optimized/static/css
7.292 #we generate the output in the same directory, as relative imports won't work otherwise...
7.292 cleancss -o newBuild/static/css/main.min.css \
7.292               newBuild/static/css/main.css
7.539 #we move the file to another directory afterwards...
7.540 mv newBuild/static/css/main.min.css \
7.540    newBuild/optimized/static/css/main.min.css
7.541 #we copy dependent resources (fonts) to the optimized directory
7.541 rsync -am --include="*.woff" --include="*.eot" --include="*.woff2" --include="*/" \
7.541     --exclude="*" -a newBuild/static/bower_components \
7.541     newBuild/optimized/static
7.573 rsync -am --include="*.woff" --include="*.eot" --include="*.woff2" --include="*/" \
7.573     --exclude="*" -a newBuild/static/bower_components/octicons/octicons/ \
7.573     newBuild/optimized/static/css
7.602 rsync -am --include="*.woff" --include="*.eot" --include="*.woff2" --include="*/" \
7.602     --exclude="*" -a newBuild/static/bower_components/font-awesome/fonts/ \
7.602     newBuild/optimized/static/fonts
7.649 mkdir -p newBuild/optimized/static
7.650 cp -rf newBuild/static/assets newBuild/optimized/static
7.658 cp -rf newBuild/static/extra/* newBuild/static/js
7.662 #r.js -o newBuild/static/js/build.js optimize=none
7.662 r.js -o newBuild/static/js/build.js
7.751
7.751 Tracing dependencies for: boot
7.984 Error: ENOENT: no such file or directory, open '/srv/betterscan/quantifiedcode/frontend/newBuild/static/js/components/subscription/settings.js'
7.984 In module tree:
7.984     boot
7.984       main
7.984         routes
7.984
7.985 Error: Error: ENOENT: no such file or directory, open '/srv/betterscan/quantifiedcode/frontend/newBuild/static/js/components/subscription/settings.js'
7.985 In module tree:
7.985     boot
7.985       main
7.985         routes
7.985
7.985     at Object.openSync (node:fs:596:3)
7.985
7.988 make: *** [Makefile:47: optimize-rjs] Error 1
------
failed to solve: process "/bin/sh -c sudo -u user make" did not complete successfully: exit code: 2

Steps to reproduce:

On an ARM (MacBook Pro with M3 processor) clone the project and run these commands:

cd docker
docker compose build

Expected outcome:

No errors and an image being built.

Additional information.

Even adding service.server.platform: linux/amd64 to the docker-compose.yml didn't bring other results.

marcinguy commented 5 months ago

Hi @heiglandreas

There were some bugs (code, missing files, extra comments in several yaml files)

Please try now