Docker: drop root in test images

This commit is contained in:
Shadow
2026-02-20 12:45:34 -06:00
parent 8c9f35cdb5
commit 84281abd4b
4 changed files with 12 additions and 0 deletions

View File

@@ -11,4 +11,7 @@ RUN apt-get update \
COPY run.sh /usr/local/bin/openclaw-install-e2e
RUN chmod +x /usr/local/bin/openclaw-install-e2e
RUN useradd --create-home --shell /bin/bash appuser
USER appuser
ENTRYPOINT ["/usr/local/bin/openclaw-install-e2e"]

View File

@@ -22,4 +22,8 @@ RUN pnpm install --frozen-lockfile
RUN pnpm build
RUN pnpm ui:build
RUN useradd --create-home --shell /bin/bash appuser \
&& chown -R appuser:appuser /app
USER appuser
CMD ["bash"]

View File

@@ -7,3 +7,7 @@ WORKDIR /app
COPY . .
RUN pnpm install --frozen-lockfile
RUN useradd --create-home --shell /bin/bash appuser \
&& chown -R appuser:appuser /app
USER appuser