forked from boos/BoosAPI
fix: avoid armv7 desktop postinstall in docker build (#262)
This commit is contained in:
+2
-1
@@ -10,7 +10,8 @@ RUN apt-get update \
|
||||
ENV PYTHON=/usr/bin/python3
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci --no-audit --no-fund
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci --ignore-scripts --no-audit --no-fund
|
||||
RUN npm rebuild esbuild sharp better-sqlite3 --no-audit --no-fund
|
||||
|
||||
COPY . .
|
||||
RUN npm run build:web && npm run build:server
|
||||
|
||||
@@ -26,9 +26,9 @@ describe('docker workflows', () => {
|
||||
it('keeps server docker builds isolated from desktop packaging dependencies', () => {
|
||||
const dockerfile = readFileSync(resolve(process.cwd(), 'docker/Dockerfile'), 'utf8');
|
||||
|
||||
expect(dockerfile).toContain('npm ci --no-audit --no-fund');
|
||||
expect(dockerfile).not.toContain('npm ci --omit=peer --no-audit --no-fund');
|
||||
expect(dockerfile).not.toContain('npm ci --include=dev --omit=peer --no-audit --no-fund');
|
||||
expect(dockerfile).toContain('npm ci --ignore-scripts --no-audit --no-fund');
|
||||
expect(dockerfile).toContain('npm rebuild esbuild sharp better-sqlite3 --no-audit --no-fund');
|
||||
expect(dockerfile).not.toContain('npm ci --no-audit --no-fund');
|
||||
expect(dockerfile).toContain('RUN npm run build:web && npm run build:server');
|
||||
expect(dockerfile).toContain('npm prune --omit=dev --no-audit --no-fund');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user