Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: install latest corepack globally #240

Merged
merged 7 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dockerfiles/node-app-pnpm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RUN apk update && \
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
echo "Asia/Tokyo" > /etc/timezone && \
apk del tzdata && \
npm install -g corepack@latest && \
pnpm approve-builds && \
corepack enable

WORKDIR /app
Expand All @@ -24,7 +26,8 @@ RUN chmod +x entrypoint.sh
COPY package.json tsconfig.json ./
COPY src src

RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --offline
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --offline && \
pnpm approve-builds

ENV NODE_ENV=production

Expand Down
6 changes: 4 additions & 2 deletions dockerfiles/puppeteer-pnpm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN apk upgrade --no-cache --available && \
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
echo "Asia/Tokyo" > /etc/timezone && \
apk del tzdata && \
npm install -g corepack && \
npm install -g corepack@latest && \
pnpm approve-builds && \
corepack enable

WORKDIR /app
Expand All @@ -25,7 +26,8 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm fetch
COPY package.json tsconfig.json ./
COPY src src

RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --offline
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --offline && \
pnpm approve-builds

COPY entrypoint.sh ./
RUN chmod +x ./entrypoint.sh
Expand Down
6 changes: 4 additions & 2 deletions dockerfiles/puppeteer-virtual-display-pnpm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN apk upgrade --no-cache --available && \
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
echo "Asia/Tokyo" > /etc/timezone && \
apk del tzdata && \
npm install -g corepack && \
npm install -g corepack@latest && \
pnpm approve-builds && \
corepack enable

WORKDIR /app
Expand All @@ -25,7 +26,8 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm fetch
COPY package.json tsconfig.json ./
COPY src src

RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --offline
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --offline && \
pnpm approve-builds

COPY entrypoint.sh ./
RUN chmod +x ./entrypoint.sh
Expand Down
9 changes: 6 additions & 3 deletions dockerfiles/tests/node-app-pnpm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
"scripts": {
"start": "tsx ./src/main.ts"
},
"dependencies": {
"tsx": "4.1.3"
},
"devDependencies": {
"@types/node": "18.11.15",
"tsx": "4.1.3",
"typescript": "4.9.4"
}
}
},
"packageManager": "[email protected]+sha512.398035c7bd696d0ba0b10a688ed558285329d27ea994804a52bad9167d8e3a72bcb993f9699585d3ca25779ac64949ef422757a6c31102c12ab932e5cbe5cc92"
}
Loading