mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Mimic production build
This commit is contained in:
parent
7b9f9bbf3c
commit
78718744c5
2 changed files with 9 additions and 10 deletions
|
|
@ -6,18 +6,20 @@ ENV CI=true
|
|||
WORKDIR /app
|
||||
|
||||
# Copy package files first for better caching
|
||||
COPY packages/safe-chain/package.json ./
|
||||
COPY packages/safe-chain/npm-shrinkwrap.json ./
|
||||
COPY packages/safe-chain/package.json ./packages/safe-chain/package.json
|
||||
COPY ./package.json ./package.json
|
||||
COPY ./npm-shrinkwrap.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
RUN npm ci
|
||||
|
||||
# Copy the rest of the application
|
||||
COPY packages/safe-chain ./
|
||||
|
||||
# Build the application
|
||||
RUN npm --no-git-tag-version version 1.0.0 --allow-same-version
|
||||
RUN npm pack
|
||||
RUN npm --no-git-tag-version version 1.0.0 --allow-same-version --workspace=packages/safe-chain
|
||||
RUN cp ./npm-shrinkwrap.json packages/safe-chain/
|
||||
RUN npm pack --workspace=packages/safe-chain
|
||||
|
||||
FROM buildpack-deps:trixie
|
||||
|
||||
|
|
@ -80,8 +82,7 @@ RUN apt-get update && apt-get install -y pipx && \
|
|||
|
||||
# Copy and install Safe chain
|
||||
COPY --from=builder /app/*.tgz /pkgs/
|
||||
# RUN npm install -g /pkgs/*.tgz
|
||||
RUN npm install -g @aikidosec/safe-chain
|
||||
RUN npm install -g /pkgs/*.tgz
|
||||
|
||||
WORKDIR /testapp
|
||||
RUN npm init -y
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue