Merge branch 'docker-nonroot' into 'dev'

Allow docker image to run as non-root

See merge request Shinobi-Systems/Shinobi!462
cycling-live-grid
Moe 2023-04-10 01:37:58 +00:00
commit 63c00588bd
2 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,7 @@ if [ ! -e "/config/conf.json" ]; then
node tools/modifyConfiguration.js cpuUsageMarker=CPU subscriptionId=$SUBSCRIPTION_ID thisIsDocker=true pluginKeys="$PLUGIN_KEYS" databaseType="$DB_TYPE" db="$DATABASE_CONFIG" ssl="$SSL_CONFIG"
cp /config/conf.json conf.json
fi
sudo sed -i -e 's/change_this_to_something_very_random__just_anything_other_than_this/'"$cronKey"'/g' conf.json
sed -i -e 's/change_this_to_something_very_random__just_anything_other_than_this/'"$cronKey"'/g' conf.json
echo "============="

View File

@ -88,6 +88,7 @@ COPY . .
#RUN rm -rf /home/Shinobi/plugins
COPY ./plugins /home/Shinobi/plugins
RUN chmod -R 777 /home/Shinobi/plugins
RUN chmod 777 /home/Shinobi
RUN npm i npm@latest -g && \
npm install --unsafe-perm && \
npm install pm2 -g