lichess-org / lila-docker

Lichess local development using Docker Compose.
GNU Affero General Public License v3.0
44 stars 44 forks source link

use corepack for pnpm #87

Closed fitztrev closed 5 months ago

trevorbayless commented 5 months ago

I came across this when trying to ./lila-docker format today after receiving the following:

Screenshot_20240514_113808

I tested out the changes in this PR and they work, but unfortunately are adding additional prompts on start and format (as I'm sure you saw):

Screenshot_20240514_114155

An alternative (but certainly not ideal) approach could be to remove RUN corepack enable and add ENV COREPACK_ENABLE_STRICT=0 before RUN npm install --global pnpm@9 in the two dockerfiles. This works as well, and continues without user prompt but does supply a warning:

Screenshot_20240514_115628

As mentioned, certainly not ideal but figured I'd some discussion to the PR for thought.

fitztrev commented 5 months ago

I actually hadn't seen that prompt yet. I think I was still using a cached image that had pnpm 9.1.0 so it didn't need to download a different version yet.

I looked into the docs and found the COREPACK_ENABLE_DOWNLOAD_PROMPT env and it seems to work. Could you try it out and see if that's an option?

trevorbayless commented 5 months ago

Nice find on that environment variable. Tested and working!