scancode.io
scancode.io copied to clipboard
Problems with running docker image on windows 10
Edition Windows 10 Home Single Language Version 21H1 OS build 19043.1586
I was following instructions from the docs to install and run scancode with docker. Up to building the image, there was no issue, but when I am trying to run the image using docker-compose up
scancodeio-worker-1 exits with code 127 and nginx exits with code 1. I have docker desktop installed, and I have installed GNU make with chocolatey in my machine.
Here is the terminal message:
Container scancodeio-redis-1 Created
Container scancodeio-db-1 Created
Container scancodeio-web-1 Created
Container scancodeio-worker-1 Created
Container scancodeio-nginx-1 Created
Attaching to scancodeio-db-1, scancodeio-nginx-1, scancodeio-redis-1, scancodeio-web-1, scancodeio-worker-1
scancodeio-db-1 |
scancodeio-db-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
scancodeio-db-1 |
scancodeio-redis-1 | 1:C 22 Mar 2022 15:28:16.650 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
scancodeio-redis-1 | 1:C 22 Mar 2022 15:28:16.650 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started
scancodeio-redis-1 | 1:C 22 Mar 2022 15:28:16.650 # Configuration loaded
scancodeio-redis-1 | 1:M 22 Mar 2022 15:28:16.651 * monotonic clock: POSIX clock_gettime
scancodeio-redis-1 | 1:M 22 Mar 2022 15:28:16.652 * Running mode=standalone, port=6379.
scancodeio-redis-1 | 1:M 22 Mar 2022 15:28:16.652 # Server initialized
scancodeio-redis-1 | 1:M 22 Mar 2022 15:28:16.652 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
scancodeio-redis-1 | 1:M 22 Mar 2022 15:28:16.653 * Ready to accept connections
scancodeio-db-1 | 2022-03-22 15:28:16.903 UTC [1] LOG: starting PostgreSQL 13.6 (Debian 13.6-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
scancodeio-db-1 | 2022-03-22 15:28:16.904 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
scancodeio-db-1 | 2022-03-22 15:28:16.904 UTC [1] LOG: listening on IPv6 address "::", port 5432
scancodeio-db-1 | 2022-03-22 15:28:17.092 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
scancodeio-db-1 | 2022-03-22 15:28:17.272 UTC [27] LOG: database system was shut down at 2022-03-22 15:28:03 UTC
scancodeio-db-1 | 2022-03-22 15:28:17.355 UTC [1] LOG: database system is ready to accept connections
scancodeio-web-1 | /usr/bin/env: ‘python\r’: No such file or directory
scancodeio-web-1 exited with code 127
scancodeio-worker-1 | /usr/bin/env: ‘python\r’: No such file or directory
scancodeio-nginx-1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
scancodeio-nginx-1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
scancodeio-nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
scancodeio-nginx-1 | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
scancodeio-nginx-1 | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
scancodeio-nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
scancodeio-nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
scancodeio-nginx-1 | /docker-entrypoint.sh: Configuration complete; ready for start up
scancodeio-worker-1 exited with code 127
scancodeio-nginx-1 | 2022/03/22 15:28:25 [emerg] 1#1: host not found in upstream "web:8000" in /etc/nginx/conf.d/default.conf:2
scancodeio-nginx-1 | nginx: [emerg] host not found in upstream "web:8000" in /etc/nginx/conf.d/default.conf:2
scancodeio-nginx-1 exited with code 1
@PlabanKr I was also facing the same issue. I fixed it by going to the manage.py
file and at the end of the shebang line, just put a space at the end of the python
word. This is an error of CRLF/LF
.
@PlabanKr @Pratyush1606 any changes we can make in the codebase to fix this issue for good?
A warning about the crlf issue was added in the documentation https://github.com/nexB/scancode.io/commit/37d325a03c02dc5ae9205d4b16eaf729253523ee#diff-d9b149498982c0663c3b7170398773361ed5678f1a627e9c2fd8d2c955c563dbR38-R41