Spaces:
Running
Running
File size: 871 Bytes
fbd7ee9 a21f3e3 26ae49e a21f3e3 a2724da 4eaeb30 a21f3e3 16a5bd8 a21f3e3 a2724da 4eaeb30 a21f3e3 26ae49e a21f3e3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | FROM ghcr.io/su-kaka/gcli2api:latest
ENV PORT=7860
EXPOSE 7860
RUN mkdir -p /app/creds && chmod 777 /app/creds && \
apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
CMD sh -c '\
if [ -n "$GCLI_JSON" ]; then echo "$GCLI_JSON" > /tmp/gcli.json; fi && \
if [ -n "$AG_JSON" ]; then echo "$AG_JSON" > /tmp/ag.json; fi && \
python web.py & \
sleep 20 && \
if [ -f /tmp/gcli.json ]; then \
curl -s -X POST "http://127.0.0.1:7860/creds/upload?mode=geminicli" \
-H "Authorization: Bearer $PASSWORD" \
-F "files=@/tmp/gcli.json" ; \
echo "✅ GCLI凭证已导入"; \
fi && \
if [ -f /tmp/ag.json ]; then \
curl -s -X POST "http://127.0.0.1:7860/creds/upload?mode=antigravity" \
-H "Authorization: Bearer $PASSWORD" \
-F "files=@/tmp/ag.json" ; \
echo "✅ AG凭证已导入"; \
fi && \
wait'
|