0
0

Next.js の dashboard tutorial 用の docker image を作ってみました。

Posted at

作成した Dockerfile

FROM node:20-alpine
RUN apk update && \
    apk upgrade && \
    apk add --no-cache g++ && \
    apk add --no-cache make && \
    apk add --no-cache python3 && \
    mkdir /home/pnpm && \
    npm install -g npm@latest && \
    npm install -g pnpm && \
    pnpm config set store-dir /home/pnpm/store

npm が古いと警告が出たので npm を最新に upgrade しています。

npm install -g npm@latest

出た警告

1 package is looking for funding
  run `npm fund` for details
npm notice
npm notice New patch version of npm available! 10.8.1 -> 10.8.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2
npm notice To update run: npm install -g npm@10.8.2

npx create-next-app を実行すると no such file or

directory エラーが出たので、 pnpm をインストールした後で、ストアの設定をしています。

pnpm config set store-dir /home/pnpm/store

出た警告

 ERR_PNPM_ENOENT  ENOENT: no such file or directory, copyfile '/tmp/.pnpm-store/v3/files/bb/fff7acd12649dcbaa64c9525e49808b3c214609635b0aa22c35e5b21b923a9535c00ecaabbc4bfd4fe5491b158e9f6a227cf1e35c728dd4d606cf6075e9b34' -> '/tmp/nextjs-dashboard/node_modules/.pnpm/any-promise@1.3.0/node_modules/any-promise_tmp_42/register/bluebird.d.ts'
Progress: resolved 227, reused 0, downloaded 113, added 104

Aborting installation.
  pnpm install has failed.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0