Docker Desktop on Windowsã§node.jsã®ã³ãã³ããå®è¡ãã
ç°å¢
- Docker Desktop for Windows 4.0.0
- Node.js 14ç³»
å®è¡æ¹æ³(ãã¾ããããã®)
node:14ã®ã¤ã¡ã¼ã¸ã使ç¨ããã
docker run --rm -it -v <ãã¹ãã®çµ¶å¯¾ãã¹>:/home/node/app -w /home/node/app node:14 <ã³ãã³ã>
å®è¡æ¹æ³(失æãããã¨ããããã®)
node:14-alpineã®ã¤ã¡ã¼ã¸ã§ãnpx create-react-appãããããã¨ã©ã¼ãåºããæ ¹æ¬åå ã¯ä¸æã
$ docker run --rm -it -v <ãã¹ãã®çµ¶å¯¾ãã¹>/:/home/node/app -w /home/node/app node:14-alpine npx create-react-app 20210912-react-ts-app --template typescript npx: installed 67 in 14.328s Creating a new React app in /home/node/app/20210912-react-ts-app. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template-typescript... yarn add v1.22.5 [1/4] Resolving packages... [2/4] Fetching packages... error An unexpected error occurred: "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.15.2.tgz: 140593871818056:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:../deps/openssl/openssl/ssl/record/ssl3_record.c:677: ". info If you think this is a bug, please open a bug report with the information provided in "/home/node/app/20210912-react-ts-app/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. ^C Aborting installation. yarnpkg add --exact react react-dom react-scripts cra-template-typescript --cwd /home/node/app/20210912-react-ts-app has failed. Deleting generated file... package.json Deleting generated file... yarn.lock Done.