FROM node:16-alpine ENV PORT 7860 RUN apk update && apk upgrade && apk add git wget RUN chmod -R u+rwx,g+rwx,o+rwx /tmp ENV localrepoPath /tmp/okok CMD export Interval=10000 &&\ (while true;do git clone https://github.com/edwagbb/GitPipeLocal.git /tmp/gitpipelocal && break || sleep 5;done) &&\ cd /tmp/gitpipelocal && npm install &&\ (while true;do git clone $remoteUrlWithToken $localrepoPath && break || sleep 5;done) &&\ cd $localrepoPath &&\ npm install &&\ export func_dir=$localrepoPath/functions &&\ export static_dir=$localrepoPath/static &&\ (node $localrepoPath/index.js & node /tmp/gitpipelocal/index.js)