Per completezza, e se può essere utile a qualcuno. Esiste almeno un modo per far funzionare ember cli come previsto con un uid casuale, ed è assicurarsi che l’uid casuale assegnato abbia una voce in /etc/passwd al momento dell’esecuzione dell’operazione rake assets:precompile.
Qualcosa come:
if [ `id -u` -ge 10000 ]; then
cat /etc/passwd | sed -e "s/^discourse:/builder:/" > /tmp/passwd
echo "discourse:x:`id -u`:`id -g`:,,,:/home/discourse:/bin/bash" >> /tmp/passwd
cat /tmp/passwd > /etc/passwd
rm /tmp/passwd
fi
Quindi, il comando app/assets/javascripts/discourse run ember build -prod (da discourse/assets.rake at tests-passed · discourse/discourse · GitHub) lo farà.
yarn run v1.22.17
$ /discourse/app/assets/javascripts/node_modules/.bin/ember build -prod
WARNING: Node v16.13.2 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
DEPRECATION: The integration of jQuery into Ember has been deprecated and will be removed with Ember 4.0. You can either opt-out of using jQuery, or install the `@ember/jquery` addon to provide the jQuery integration. Please consult the deprecation guide for further details: https://emberjs.com/deprecations/v3.x#toc_jquery-apis
- Building
Environment: production
- Building
- building...
[WARN] (broccoli-terser-sourcemap) Minifying "assets/chunk.529.6ee9018498e97f872147.js" took: 24288ms (more than 20,000ms)
...
Ho anche notato che questa operazione è piuttosto costosa, consumando quasi 2 GB di RAM solo per la precompilazione
Saluti,
Ismael