mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-07-09 07:25:43 +08:00
fix: harden docker cloudcli install
This commit is contained in:
14
.github/workflows/docker.yml
vendored
14
.github/workflows/docker.yml
vendored
@@ -14,18 +14,22 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
template: [claude-code, codex, gemini]
|
template: [claude-code, codex]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v4
|
||||||
|
with:
|
||||||
|
platforms: arm64
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v4
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
@@ -40,7 +44,7 @@ jobs:
|
|||||||
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
|
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v7
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
file: ./docker/${{ matrix.template }}/Dockerfile
|
file: ./docker/${{ matrix.template }}/Dockerfile
|
||||||
|
|||||||
@@ -5,7 +5,16 @@ COPY shared/install-cloudcli.sh /tmp/install-cloudcli.sh
|
|||||||
RUN chmod +x /tmp/install-cloudcli.sh && /tmp/install-cloudcli.sh
|
RUN chmod +x /tmp/install-cloudcli.sh && /tmp/install-cloudcli.sh
|
||||||
|
|
||||||
USER agent
|
USER agent
|
||||||
RUN npm install -g @cloudcli-ai/cloudcli && cloudcli --version
|
RUN --mount=type=cache,target=/tmp/npm-cache,sharing=locked,mode=0777 \
|
||||||
|
npm install -g @cloudcli-ai/cloudcli \
|
||||||
|
--cache=/tmp/npm-cache \
|
||||||
|
--fetch-retries=5 \
|
||||||
|
--fetch-retry-mintimeout=20000 \
|
||||||
|
--fetch-retry-maxtimeout=120000 \
|
||||||
|
--fetch-timeout=600000 \
|
||||||
|
--no-audit \
|
||||||
|
--no-fund && \
|
||||||
|
cloudcli --version
|
||||||
|
|
||||||
COPY --chown=agent:agent shared/start-cloudcli.sh /home/agent/.cloudcli-start.sh
|
COPY --chown=agent:agent shared/start-cloudcli.sh /home/agent/.cloudcli-start.sh
|
||||||
RUN echo '. ~/.cloudcli-start.sh' >> /home/agent/.bashrc
|
RUN echo '. ~/.cloudcli-start.sh' >> /home/agent/.bashrc
|
||||||
|
|||||||
@@ -5,7 +5,16 @@ COPY shared/install-cloudcli.sh /tmp/install-cloudcli.sh
|
|||||||
RUN chmod +x /tmp/install-cloudcli.sh && /tmp/install-cloudcli.sh
|
RUN chmod +x /tmp/install-cloudcli.sh && /tmp/install-cloudcli.sh
|
||||||
|
|
||||||
USER agent
|
USER agent
|
||||||
RUN npm install -g @cloudcli-ai/cloudcli && cloudcli --version
|
RUN --mount=type=cache,target=/tmp/npm-cache,sharing=locked,mode=0777 \
|
||||||
|
npm install -g @cloudcli-ai/cloudcli \
|
||||||
|
--cache=/tmp/npm-cache \
|
||||||
|
--fetch-retries=5 \
|
||||||
|
--fetch-retry-mintimeout=20000 \
|
||||||
|
--fetch-retry-maxtimeout=120000 \
|
||||||
|
--fetch-timeout=600000 \
|
||||||
|
--no-audit \
|
||||||
|
--no-fund && \
|
||||||
|
cloudcli --version
|
||||||
|
|
||||||
COPY --chown=agent:agent shared/start-cloudcli.sh /home/agent/.cloudcli-start.sh
|
COPY --chown=agent:agent shared/start-cloudcli.sh /home/agent/.cloudcli-start.sh
|
||||||
RUN echo '. ~/.cloudcli-start.sh' >> /home/agent/.bashrc
|
RUN echo '. ~/.cloudcli-start.sh' >> /home/agent/.bashrc
|
||||||
|
|||||||
Reference in New Issue
Block a user