chore(docker): 🔧 Update Docker build configurations for optimized stages, base images, and dependency alignment
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
332854bb29
commit
44ba1681b9
5 changed files with 7 additions and 6 deletions
|
|
@ -7,7 +7,7 @@ COPY package.json ./
|
|||
RUN node -e " \
|
||||
const p = JSON.parse(require('fs').readFileSync('./package.json', 'utf8')); \
|
||||
p.dependencies = Object.fromEntries( \
|
||||
Object.entries(p.dependencies || {}).filter(([k]) => !k.startsWith('@lilith/')) \
|
||||
Object.entries(p.dependencies || {}).filter(([, v]) => typeof v !== 'string' || !v.startsWith('workspace:')) \
|
||||
); \
|
||||
delete p.devDependencies; \
|
||||
require('fs').writeFileSync('./package.json', JSON.stringify(p, null, 2)); \
|
||||
|
|
|
|||
|
|
@ -4,12 +4,13 @@ WORKDIR /app
|
|||
# Pre-built by turbo before deploy — dist has @lilith/* compiled in via SWC
|
||||
COPY dist ./dist
|
||||
|
||||
# Install only registry deps (strip workspace:* entries that are already compiled in)
|
||||
# Install only registry deps (strip workspace:* entries — those are compiled into dist via SWC).
|
||||
# Registry @lilith/* deps (e.g. @lilith/gov-detection ^1.0.3) MUST be installed from the registry.
|
||||
COPY package.json ./
|
||||
RUN node -e " \
|
||||
const p = JSON.parse(require('fs').readFileSync('./package.json', 'utf8')); \
|
||||
p.dependencies = Object.fromEntries( \
|
||||
Object.entries(p.dependencies || {}).filter(([k]) => !k.startsWith('@lilith/')) \
|
||||
Object.entries(p.dependencies || {}).filter(([, v]) => typeof v !== 'string' || !v.startsWith('workspace:')) \
|
||||
); \
|
||||
delete p.devDependencies; \
|
||||
require('fs').writeFileSync('./package.json', JSON.stringify(p, null, 2)); \
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ COPY package.json ./
|
|||
RUN node -e " \
|
||||
const p = JSON.parse(require('fs').readFileSync('./package.json', 'utf8')); \
|
||||
p.dependencies = Object.fromEntries( \
|
||||
Object.entries(p.dependencies || {}).filter(([k]) => !k.startsWith('@lilith/')) \
|
||||
Object.entries(p.dependencies || {}).filter(([, v]) => typeof v !== 'string' || !v.startsWith('workspace:')) \
|
||||
); \
|
||||
delete p.devDependencies; \
|
||||
require('fs').writeFileSync('./package.json', JSON.stringify(p, null, 2)); \
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ COPY package.json ./
|
|||
RUN node -e " \
|
||||
const p = JSON.parse(require('fs').readFileSync('./package.json', 'utf8')); \
|
||||
p.dependencies = Object.fromEntries( \
|
||||
Object.entries(p.dependencies || {}).filter(([k]) => !k.startsWith('@lilith/')) \
|
||||
Object.entries(p.dependencies || {}).filter(([, v]) => typeof v !== 'string' || !v.startsWith('workspace:')) \
|
||||
); \
|
||||
delete p.devDependencies; \
|
||||
require('fs').writeFileSync('./package.json', JSON.stringify(p, null, 2)); \
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ COPY package.json ./
|
|||
RUN node -e " \
|
||||
const p = JSON.parse(require('fs').readFileSync('./package.json', 'utf8')); \
|
||||
p.dependencies = Object.fromEntries( \
|
||||
Object.entries(p.dependencies || {}).filter(([k]) => !k.startsWith('@lilith/')) \
|
||||
Object.entries(p.dependencies || {}).filter(([, v]) => typeof v !== 'string' || !v.startsWith('workspace:')) \
|
||||
); \
|
||||
delete p.devDependencies; \
|
||||
require('fs').writeFileSync('./package.json', JSON.stringify(p, null, 2)); \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue