如何在Ubuntu 20.04 Docker容器中运行Renovate



我想在Ubuntu 20.04 docker容器中运行Renovate,但Renovate似乎不起作用。以下是重新记录我的设置的步骤:

docker run -it ubuntu:20.04 /bin/bash
apt update
apt upgrade
printf 'yn1n1n' | apt install nodejs
apt install -y npm
npm install -g renovate
renovate --version

renovate --version给我:

/usr/local/lib/node_modules/renovate/dist/logger/index.js:13
let logContext = process.env.LOG_CONTEXT ?? (0, nanoid_1.nanoid)();
^
SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/renovate/dist/renovate.js:5:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
root@3b484953056f:/# renovate --version
/usr/local/lib/node_modules/renovate/dist/logger/index.js:13
let logContext = process.env.LOG_CONTEXT ?? (0, nanoid_1.nanoid)();
^
SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/renovate/dist/renovate.js:5:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

你知道我在这里做错了什么吗?我需要设置RENOVATE_LOG_CONTEXT吗?如果是这样,如何做到这一点?

检查节点和git版本。必须更新,否则将出现该错误。

如果github讨论比这更活跃,下次应该试试。

您应该查看github存储库,查看此存储库中的ubuntu示例:https://github.com/renovatebot/docker-ubuntu/blob/master/Dockerfile

相关内容

  • 没有找到相关文章

最新更新