こんだけ
$ docker run --rm -it node:lts bash
node@3f80fb74707d:~$ mkdir fuga
node@3f80fb74707d:~$ cd fuga
node@3f80fb74707d:~/fuga$ npm init -y
Wrote to /home/node/fuga/package.json:
{
"name": "fuga",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}
node@3f80fb74707d:~/fuga$ ls -la
total 12
drwxr-xr-x 2 node node 4096 Sep 6 04:58 .
drwxr-xr-x 1 node node 4096 Sep 6 04:58 ..
-rw-r--r-- 1 node node 218 Sep 6 04:58 package.json
node@3f80fb74707d:~/fuga$ cat package.json
{
"name": "fuga",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}