FROM justsong/one-api:latest RUN apk add --no-cache pcre2 COPY --from=cloudflare/cloudflared:latest /usr/local/bin/cloudflared /usr/local/bin/cloudflared COPY --from=nginx:alpine /etc/nginx /etc/nginx COPY --from=nginx:alpine /usr/sbin/nginx /usr/sbin/nginx COPY nginx.conf /etc/nginx/nginx.conf RUN mkdir -p /var/log/nginx && \ mkdir -p /var/cache/nginx && \ mkdir -p /var/run && \ chmod -R 777 /var/log/nginx && \ chmod -R 777 /var/cache/nginx && \ chmod -R 777 /var/run WORKDIR /data ENV CF_TOKEN=CF_TOKEN EXPOSE 3001 RUN chmod 777 -R /data ENTRYPOINT cloudflared tunnel --no-autoupdate run --token $CF_TOKEN & \ nginx & \ /one-api