OS: Ubuntu 20.04
docker -v # my docker version is: Docker version 19.03.13, build 4484c46d9d
I did like this:
Set the .env.local variable
, the site works without docker if I use warn run dev
cd nft-demo # optional (to be inside the nft-demo folder if not there already)
docker build . # Please note in the README it's written docker build nft-demo .
which does not work, docker build needs exactly 1 parameter not 2...
docker images
docker run -p 3000:3000 -i -d IMAGEID
I browse to http://localhost:3000/
Loading indicator loads forever.
Browser console:
![image](https://user-images.githubusercontent.com/49552918/112747442-cc0a1f00-8fb5-11eb-839c-c68970c965d3.png)
I also tried to copy .env.local to .env
Same result
Notice that when I build the image I get a lot of errors in red:
Step 18/20 : RUN yarn build
---> Running in 910a82909c4d
yarn run v1.22.5
$ next build
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Loaded env from /usr/src/app/.env.local
Loaded env from /usr/src/app/.env
info - Creating an optimized production build...
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
info - Using external babel configuration from /usr/src/app/babel.config.json
info - Compiled successfully
info - Collecting page data...
n [Error]
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
json: undefined
}
(node:26) UnhandledPromiseRejectionWarning: Error
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use node --trace-warnings ...
to show where the warning was created)
(node:26) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:26) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
n [Error]
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
json: undefined
}
(node:52) UnhandledPromiseRejectionWarning: Error
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use node --trace-warnings ...
to show where the warning was created)
(node:52) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:52) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
n [Error]
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
json: undefined
}
n [Error]
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
json: undefined
}
(node:45) UnhandledPromiseRejectionWarning: Error
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use node --trace-warnings ...
to show where the warning was created)
(node:45) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:45) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:59) UnhandledPromiseRejectionWarning: Error
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use node --trace-warnings ...
to show where the warning was created)
(node:59) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:59) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
n [Error]
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
json: undefined
}
(node:66) UnhandledPromiseRejectionWarning: Error
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use node --trace-warnings ...
to show where the warning was created)
(node:66) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:66) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
info - Generating static pages (0/4)
n [Error]
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549) {
json: undefined
}
n [Error]
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549) {
json: undefined
}
n [Error]
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549) {
json: undefined
}
(node:96) UnhandledPromiseRejectionWarning: Error
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
(Use node --trace-warnings ...
to show where the warning was created)
(node:96) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:96) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
info - Generating static pages (1/4)
(node:107) UnhandledPromiseRejectionWarning: Error
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
(Use node --trace-warnings ...
to show where the warning was created)
(node:107) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:107) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
info - Generating static pages (2/4)
n [Error]
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549) {
json: undefined
}
(node:114) UnhandledPromiseRejectionWarning: Error
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
(Use node --trace-warnings ...
to show where the warning was created)
(node:114) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:114) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
info - Generating static pages (3/4)
(node:94) UnhandledPromiseRejectionWarning: Error
at e. (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:66214)
at c (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3942)
at Generator._invoke (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:3695)
at Generator.throw (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:4301)
at o (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:310)
at u (/usr/src/app/node_modules/@proton/js/dist/js.cjs.production.min.js:1:549)
(Use node --trace-warnings ...
to show where the warning was created)
(node:94) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:94) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
If I run yarn build locally I don't get all these errors, for me it seems to work flawlessy. Just not inside docker:
yarn run v1.17.3
$ next build
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Loaded env from /nft-demo/.env.local
Loaded env from /nft-demo/.env
info - Using external babel configuration from /nft-demo/babel.config.json
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
info - Generating static pages (4/4)
info - Finalizing page optimization
Page Size First Load JS
┌ ○ / 3.58 kB 343 kB
├ /_app 0 B 330 kB
├ ○ /[templateId] 2.36 kB 349 kB
├ ○ /404 2.55 kB 333 kB
├ λ /api/profile 0 B 330 kB
├ λ /my-nfts/[chainAccount] 3.74 kB 343 kB
└ ○ /my-templates/[templateId] 3.33 kB 350 kB
- First Load JS shared by all 330 kB
├ chunks/commons.c80e79.js 13.2 kB
├ chunks/f7a7a2b2b684dd1f7d7020af3edf6ab5d4cbed9b.385beb.js 262 kB
├ chunks/framework.8eb5a3.js 41.8 kB
├ chunks/main.bbc201.js 6.17 kB
├ chunks/pages/_app.3c8a42.js 6.26 kB
├ chunks/webpack.57651b.js 751 B
└ css/c2624a443703a8a92b21.css 772 B
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
(ISR) incremental static regeneration (uses revalidate in getStaticProps)
Done in 26.94s.