Archived
update dockerfile
This commit is contained in:
+14
-11
@@ -13,14 +13,14 @@ RUN apk add --no-cache ca-certificates coreutils git openssh-client \
|
|||||||
&& addgroup -g 10001 ci-agent \
|
&& addgroup -g 10001 ci-agent \
|
||||||
&& adduser -D -u 10001 -G ci-agent -h /home/ci-agent ci-agent \
|
&& adduser -D -u 10001 -G ci-agent -h /home/ci-agent ci-agent \
|
||||||
&& install -d -o ci-agent -g ci-agent -m 0700 \
|
&& install -d -o ci-agent -g ci-agent -m 0700 \
|
||||||
/var/lib/gitea-agent/state \
|
/var/lib/gitea-agent/state \
|
||||||
/var/lib/gitea-agent/workspaces \
|
/var/lib/gitea-agent/workspaces \
|
||||||
/var/lib/opencode-agent/data \
|
/var/lib/opencode-agent/data \
|
||||||
/var/lib/opencode-agent/cache \
|
/var/lib/opencode-agent/cache \
|
||||||
&& install -d -o root -g root -m 0555 \
|
&& install -d -o root -g root -m 0555 \
|
||||||
/opt/ci-agents \
|
/opt/ci-agents \
|
||||||
/opt/ci-agents/empty-config \
|
/opt/ci-agents/empty-config \
|
||||||
/opt/ci-agents/empty-config/opencode
|
/opt/ci-agents/empty-config/opencode
|
||||||
|
|
||||||
COPY --from=app-build /src/app/dist /opt/ci-agents/dist
|
COPY --from=app-build /src/app/dist /opt/ci-agents/dist
|
||||||
COPY --from=app-build /src/app/node_modules /opt/ci-agents/node_modules
|
COPY --from=app-build /src/app/node_modules /opt/ci-agents/node_modules
|
||||||
@@ -48,10 +48,10 @@ ARG GITEA_MCP_VERSION=1.3.0
|
|||||||
USER root
|
USER root
|
||||||
RUN npm install --global --omit=dev "opencode-ai@${OPENCODE_VERSION}" \
|
RUN npm install --global --omit=dev "opencode-ai@${OPENCODE_VERSION}" \
|
||||||
&& case "${TARGETARCH}" in \
|
&& case "${TARGETARCH}" in \
|
||||||
amd64) asset="gitea-mcp_Linux_x86_64.tar.gz"; sha="99e144ee9821c8ef26dfb05daa3351435ed55eb56bd1b7418c4f7b573cc92ce2" ;; \
|
amd64) asset="gitea-mcp_Linux_x86_64.tar.gz"; sha="99e144ee9821c8ef26dfb05daa3351435ed55eb56bd1b7418c4f7b573cc92ce2" ;; \
|
||||||
arm64) asset="gitea-mcp_Linux_arm64.tar.gz"; sha="07dd4b6823c145baee817ad664043cc26ce5903d0358693949b0ee2da18d4b62" ;; \
|
arm64) asset="gitea-mcp_Linux_arm64.tar.gz"; sha="07dd4b6823c145baee817ad664043cc26ce5903d0358693949b0ee2da18d4b62" ;; \
|
||||||
*) echo "Unsupported TARGETARCH: ${TARGETARCH}" >&2; exit 1 ;; \
|
*) echo "Unsupported TARGETARCH: ${TARGETARCH}" >&2; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& wget -q -O "/tmp/${asset}" "https://gitea.com/gitea/gitea-mcp/releases/download/v${GITEA_MCP_VERSION}/${asset}" \
|
&& wget -q -O "/tmp/${asset}" "https://gitea.com/gitea/gitea-mcp/releases/download/v${GITEA_MCP_VERSION}/${asset}" \
|
||||||
&& printf '%s %s\n' "${sha}" "/tmp/${asset}" | sha256sum --check - \
|
&& printf '%s %s\n' "${sha}" "/tmp/${asset}" | sha256sum --check - \
|
||||||
&& tar -xzf "/tmp/${asset}" -C /tmp \
|
&& tar -xzf "/tmp/${asset}" -C /tmp \
|
||||||
@@ -59,6 +59,9 @@ RUN npm install --global --omit=dev "opencode-ai@${OPENCODE_VERSION}" \
|
|||||||
&& rm -f "/tmp/${asset}" /tmp/gitea-mcp
|
&& rm -f "/tmp/${asset}" /tmp/gitea-mcp
|
||||||
|
|
||||||
COPY opencode /opt/ci-agents/opencode
|
COPY opencode /opt/ci-agents/opencode
|
||||||
|
RUN chmod -R a-w /opt/ci-agents \
|
||||||
|
&& chown ci-agent /opt/ci-agents/empty-config/opencode \
|
||||||
|
&& chmod u+w /opt/ci-agents/empty-config/opencode
|
||||||
|
|
||||||
ENV XDG_DATA_HOME=/var/lib/opencode-agent/data \
|
ENV XDG_DATA_HOME=/var/lib/opencode-agent/data \
|
||||||
XDG_CONFIG_HOME=/opt/ci-agents/empty-config \
|
XDG_CONFIG_HOME=/opt/ci-agents/empty-config \
|
||||||
|
|||||||
Reference in New Issue
Block a user