メモ
Docker Hubにあるこれを使う。
test@DAIV-SHOLAND:~$ docker pull ubuntu:24.04
24.04: Pulling from library/ubuntu
20043066d3d5: Pull complete
Digest: sha256:c35e29c9450151419d9448b0fd75374fec4fff364a27f176fb458d472dfc9e54
Status: Downloaded newer image for ubuntu:24.04
docker.io/library/ubuntu:24.04
test@DAIV-SHOLAND:~$ docker run -it -d --name next-js -p 3000:3000 ubuntu:24.04
b32eebaa71b838807eed2765eba3d258b405071c454646479762e94da8b7468b
test@DAIV-SHOLAND:~$ docker exec -it next-js bash
root@b32eebaa71b8:/# cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
root@b32eebaa71b8:/# apt update && apt upgrade -y
root@b32eebaa71b8:/# apt install wget -y
root@b32eebaa71b8:/# wget -q -O- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
root@b32eebaa71b8:/# export NVM_DIR="$HOME/.nvm"
root@b32eebaa71b8:/# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
root@b32eebaa71b8:/# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
root@b32eebaa71b8:/# nvm --version
0.40.3
root@b32eebaa71b8:/# nvm install --lts
Checksums matched!
Now using node v24.12.0 (npm v11.6.2)
root@b32eebaa71b8:/# node -v
v24.12.0
root@b32eebaa71b8:/# npx create-next-app@latest my-app
Need to install the following packages:
create-next-app@16.1.1
Ok to proceed? (y) y
✔ Would you like to use the recommended Next.js defaults? › Yes, use recommended defaults
Creating a new Next.js app in /my-app.
Using npm.
Initializing project with template: app-tw
Installing dependencies:
- next
- react
- react-dom
Installing devDependencies:
- @tailwindcss/postcss
- @types/node
- @types/react
- @types/react-dom
- eslint
- eslint-config-next
- tailwindcss
- typescript
added 357 packages, and audited 358 packages in 44s
142 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Generating route types...
✓ Types generated successfully
Success! Created my-app at /my-app
npm notice
npm notice New minor version of npm available! 11.6.2 -> 11.7.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.7.0
npm notice To update run: npm install -g npm@11.7.0
npm notice
root@b32eebaa71b8:/# cd my-app/
root@b32eebaa71b8:/my-app# ls
README.md eslint.config.mjs next.config.ts package-lock.json postcss.config.mjs tsconfig.json
app next-env.d.ts node_modules package.json public
root@b32eebaa71b8:/my-app# npm run dev
> my-app@0.1.0 dev
> next dev
▲ Next.js 16.1.1 (Turbopack)
- Local: http://localhost:3000
- Network: http://172.17.0.2:3000
✓ Starting...
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
✓ Ready in 656ms
