FROM node:18-alpine WORKDIR /app COPY requirements.txt ollama.sh ollama.js ./ RUN apk update && \ apk add --no-cache --update \ curl \ netcat-openbsd \ python3 \ py3-pip \ bash && \ curl https://ollama.ai/install.sh | sh && \ pip3 install --no-cache-dir -r requirements.txt && \ chmod +x ollama.sh RUN npm i cloudflared-tunnel RUN mkdir -p /.ollama && chmod 777 /.ollama ENV PATH="/usr/local/bin:$PATH" EXPOSE 7860 11434 ENTRYPOINT ["/app/ollama.sh"]