Created
January 23, 2025 23:44
-
-
Save antoniopresto/4dfcd89e2fdaa8cea49bcad40e8e5eb6 to your computer and use it in GitHub Desktop.
Revisions
-
antoniopresto created this gist
Jan 23, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ Here i'm creating a simple sh script to redirect the `node` command to `bun`. ```sh #!/usr/bin/env sh # pnpm requires node, so we use this script as an alias on docker; if [ "$1" = "--version" ]; then echo "v20.11.1" else command bun "$@" fi ``` ```dockerfile FROM oven/bun:1-alpine as base WORKDIR $APP_PATH COPY . . ENV PNPM_VERSION=8.15.6 ENV PNPM_HOME=/root/.local/share/pnpm ENV PATH=$PATH:$PNPM_HOME # ⛳️ ./node is just a sh script redirecting `node` commands to `bun` RUN cp node /bin/node && chmod +x /bin/node RUN apk add --no-cache curl RUN curl -fsSL "https://github.com/pnpm/pnpm/releases/download/v${PNPM_VERSION}/pnpm-linuxstatic-x64" -o /bin/pnpm; \ chmod +x /bin/pnpm && \ apk del curl; ```