mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(ci): bound non-root NodeSource setup download (#108911)
This commit is contained in:
@@ -28,7 +28,10 @@ RUN --mount=type=cache,id=openclaw-install-sh-nonroot-apt-cache,target=/var/cach
|
||||
RUN --mount=type=cache,id=openclaw-install-sh-nonroot-apt-cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,id=openclaw-install-sh-nonroot-apt-lists,target=/var/lib/apt,sharing=locked \
|
||||
set -eux; \
|
||||
curl -fsSL https://deb.nodesource.com/setup_24.x | bash -; \
|
||||
installer="$(mktemp)"; \
|
||||
curl -fsSL --connect-timeout 10 --max-time 120 -o "$installer" https://deb.nodesource.com/setup_24.x; \
|
||||
bash "$installer"; \
|
||||
rm -f "$installer"; \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends nodejs
|
||||
|
||||
RUN useradd -m -s /bin/bash app \
|
||||
|
||||
@@ -463,6 +463,13 @@ describe("test-install-sh-docker", () => {
|
||||
expect(nonrootDockerfile).toContain("USER app");
|
||||
expect(nonrootDockerfile).toContain("WORKDIR /home/app");
|
||||
expect(nonrootDockerfile).toContain("NPM_CONFIG_UPDATE_NOTIFIER=false");
|
||||
expect(nonrootDockerfile).toContain('installer="$(mktemp)"');
|
||||
expect(nonrootDockerfile).toContain(
|
||||
'curl -fsSL --connect-timeout 10 --max-time 120 -o "$installer" https://deb.nodesource.com/setup_24.x',
|
||||
);
|
||||
expect(nonrootDockerfile).toContain('bash "$installer"');
|
||||
expect(nonrootDockerfile).toContain('rm -f "$installer"');
|
||||
expect(nonrootDockerfile).not.toMatch(/curl[^\n]+\|\s*bash/u);
|
||||
});
|
||||
|
||||
it("keeps shared install helpers parsing and verifying installed CLI versions", () => {
|
||||
|
||||
Reference in New Issue
Block a user