Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OCM-Engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Konstantin Tsabolov
OCM-Engine
Commits
2987d7ee
Commit
2987d7ee
authored
1 year ago
by
Steffen Schulze
Browse files
Options
Downloads
Patches
Plain Diff
kaniko fix
parent
e38ce2d8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#41297
failed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+20
-11
20 additions, 11 deletions
Dockerfile
with
20 additions
and
11 deletions
Dockerfile
+
20
−
11
View file @
2987d7ee
# Base
FROM
node:20
AS
dependencies
FROM
node:20
AS
base
ARG
APP_HOME=/home/node/app
ARG
APP_HOME=/home/node/app
ARG
SERVICE
ARG
SERVICE
...
@@ -8,16 +6,20 @@ WORKDIR ${APP_HOME}
...
@@ -8,16 +6,20 @@ WORKDIR ${APP_HOME}
RUN
corepack
enable
RUN
corepack
enable
# Dependencies
FROM
base
AS
dependencies
COPY
package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig*.json .swcrc ./
COPY
package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig*.json .swcrc ./
COPY
patches ./patches
COPY
patches ./patches
COPY
apps/shared/package.json ./apps/shared/
COPY
apps/shared/package.json ./apps/shared/
RUN
pnpm
install
--frozen-lockfile
RUN
pnpm
install
--frozen-lockfile
# Build shared
# Build shared
FROM
base
AS
build-shared
FROM
node:20
as
build-shared
ARG
APP_HOME=/home/node/app
ARG
SERVICE
WORKDIR
${APP_HOME}
RUN
corepack
enable
COPY
apps/shared ./apps/shared
COPY
apps/shared ./apps/shared
COPY
--from=dependencies ${APP_HOME}/package.json ${APP_HOME}/pnpm-lock.yaml ${APP_HOME}/pnpm-workspace.yaml ${APP_HOME}/tsconfig*.json ${APP_HOME}/.swcrc ./
COPY
--from=dependencies ${APP_HOME}/package.json ${APP_HOME}/pnpm-lock.yaml ${APP_HOME}/pnpm-workspace.yaml ${APP_HOME}/tsconfig*.json ${APP_HOME}/.swcrc ./
...
@@ -27,11 +29,18 @@ COPY --from=dependencies ${APP_HOME}/patches ./patches
...
@@ -27,11 +29,18 @@ COPY --from=dependencies ${APP_HOME}/patches ./patches
RUN
pnpm
--filter
shared build
RUN
pnpm
--filter
shared build
# Build service
# Build service
FROM
base
AS
build-service
FROM
node:20
AS
build-service
COPY
--from=dependencies ${APP_HOME}/package.json ${APP_HOME}/pnpm-lock.yaml ${APP_HOME}/pnpm-workspace.yaml ${APP_HOME}/tsconfig*.json ${APP_HOME}/.swcrc ./
ARG
APP_HOME=/home/node/app
COPY
--from=dependencies ${APP_HOME}/node_modules ./node_modules
ARG
SERVICE
COPY
--from=dependencies ${APP_HOME}/patches ./patches
WORKDIR
${APP_HOME}
RUN
corepack
enable
COPY
--from=dependencies ${APP_HOME}/package.json ${APP_HOME}/pnpm-lock.yaml ${APP_HOME}/pnpm-workspace.yaml ${APP_HOME}/tsconfig*.json ${APP_HOME}/.swcrc ./
COPY
--from=dependencies ${APP_HOME}/node_modules ./node_modules
COPY
--from=dependencies ${APP_HOME}/patches ./patches
COPY
--from=build-shared ${APP_HOME}/apps/shared ./apps/shared
COPY
--from=build-shared ${APP_HOME}/apps/shared ./apps/shared
COPY
apps/${SERVICE} ./apps/${SERVICE}
COPY
apps/${SERVICE} ./apps/${SERVICE}
RUN
pnpm
install
--frozen-lockfile
&&
pnpm
--filter
${
SERVICE
}
build
&&
pnpm
--filter
${
SERVICE
}
--prod
deploy build
RUN
pnpm
install
--frozen-lockfile
&&
pnpm
--filter
${
SERVICE
}
build
&&
pnpm
--filter
${
SERVICE
}
--prod
deploy build
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment