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

hotfix: I added 'npm install -g pnpm' in Dockerfile #377

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LorenzoLopezz
Copy link

To verify the performance, I modified the code and ran the docker cleanly, from start to finish.

@AykutSarac
Copy link
Owner

Do you think this will fix #375?

@LorenzoLopezz
Copy link
Author

Do you think this will fix #375?

Yes, the report is about the same thing.

@johnny9144
Copy link

I think using corepack to initiate pnpm is better.

here is what Dockerfile with corepack looks like

# Builder
FROM node:18-alpine as builder
RUN corepack enable
WORKDIR /src

# Cache dependencies first
COPY package.json pnpm-lock.yaml ./
RUN pnpm install

# Copy other files and build
COPY . /src/
RUN pnpm build

# App
FROM nginxinc/nginx-unprivileged
COPY --chown=nginx:nginx --from=builder /src/out /app
COPY default.conf /etc/nginx/conf.d/default.conf

only adding RUN corepack enable before pnpm install is enough.

@AykutSarac
Copy link
Owner

@johnny9144 can you open a PR for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants