FROM n6ai/pynode ARG DEBIAN_FRONTEND=noninteractive RUN apt update && apt install -y -qq git && apt clean ARG USERNAME=user ARG USER_UID=1000 RUN useradd -u $USER_UID -m $USERNAME USER $USERNAME ENV HOME /home/$USERNAME ENV PATH /home/$USERNAME/.local/bin:$PATH WORKDIR $HOME/app RUN --mount=type=secret,id=URI,mode=0444,required=true \ git clone $(cat /run/secrets/URI) . RUN pip install --no-cache-dir -qq -r requirements.txt \ && npm ci --omit dev --ignore-scripts \ && npm cache clean --force > /dev/null 2>&1 EXPOSE 7860 CMD ["npm", "start"]