diff --git a/Docker/init.sh b/Docker/init.sh index d45d6f2c..a5d0470b 100644 --- a/Docker/init.sh +++ b/Docker/init.sh @@ -80,13 +80,11 @@ cd /home/Shinobi mkdir -p libs/customAutoLoad if [ -e "/config/conf.json" ]; then cp /config/conf.json conf.json -fi -if [ ! -e "./conf.json" ]; then - sudo cp conf.sample.json conf.json +elif [ ! -e "./conf.json" ]; then + cp conf.sample.json conf.json fi sudo sed -i -e 's/change_this_to_something_very_random__just_anything_other_than_this/'"$cronKey"'/g' conf.json node tools/modifyConfiguration.js cpuUsageMarker=CPU subscriptionId=$SUBSCRIPTION_ID thisIsDocker=true pluginKeys="$PLUGIN_KEYS" db="$DATABASE_CONFIG" ssl="$SSL_CONFIG" -sudo cp conf.json /config/conf.json echo "=============" @@ -95,10 +93,8 @@ echo "Default Password : admin" echo "Log in at http://HOST_IP:SHINOBI_PORT/super" if [ -e "/config/super.json" ]; then cp /config/super.json super.json -fi -if [ ! -e "./super.json" ]; then - sudo cp super.sample.json super.json - sudo cp super.sample.json /config/super.json +elif [ ! -e "./super.json" ]; then + cp super.sample.json super.json fi if [ -e "/config/init.extension.sh" ]; then diff --git a/Dockerfile b/Dockerfile index b107af17..195c4b0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -88,13 +88,15 @@ COPY . . COPY ./plugins /home/Shinobi/plugins RUN chmod -R 777 /home/Shinobi/plugins RUN npm i npm@latest -g && \ - npm install pm2 -g && \ - npm install --unsafe-perm + npm install --unsafe-perm && \ + npm install pm2 -g COPY ./Docker/pm2.yml ./ # Copy default configuration files # COPY ./config/conf.json ./config/super.json /home/Shinobi/ RUN chmod -f +x /home/Shinobi/Docker/init.sh +RUN sed -i -e 's/\r//g' /home/Shinobi/Docker/init.sh +# RUN chmod -f +x /home/Shinobi/shinobi VOLUME ["/home/Shinobi/videos"] VOLUME ["/home/Shinobi/plugins"] @@ -104,6 +106,6 @@ VOLUME ["/var/lib/mysql"] EXPOSE 8080 -ENTRYPOINT ["/home/Shinobi/Docker/init.sh"] +ENTRYPOINT ["sh","/home/Shinobi/Docker/init.sh"] CMD [ "pm2-docker", "pm2.yml" ]