x / Dockerfile
edwagbb's picture
Update Dockerfile
e97a078 verified
raw
history blame contribute delete
714 Bytes
FROM node:16-bullseye
ENV PORT 7860
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git wget curl && \
apt-get clean
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)