Skip to content

Docker enviroment for testing and deployment #516

@Marzal

Description

@Marzal

Hi, I'm being trying without luck to install a local dev environment with docker.

I've tried al these images (from [1]):

  • node:25-trixie-slim (no git)
  • node:25-trixie (no corepack since 25)
  • node:24-trixie (yarn install Failed with errors)
  • node:22-trixie (yarn install Failed with errors)
  • node:20-trixie (yarn install Done with warnings - Error in yarn dev needs workaournd)
    • Needs export NODE_OPTIONS=--openssl-legacy-provider

So my first question is:

  • What nodejs version is the web right now running / What should be I targeting?
    Anything <20 it's EOL

Related to #511 (comment)

node:20-trixie

yarn install

➤ YN0000: ┌ Resolution step
➤ YN0002: │ @mdx-js/loader@npm:1.6.18 doesn't provide react (pccc61), requested by @mdx-js/react
➤ YN0002: │ @storybook/addon-essentials@npm:6.0.26 [53d9f] doesn't provide @babel/core (p7935e), requested by @storybook/addon-docs
➤ YN0002: │ @storybook/core@npm:6.0.26 [719ac] doesn't provide typescript (pe9342), requested by fork-ts-checker-webpack-plugin
➤ YN0002: │ @storybook/core@npm:6.0.26 [fa6e2] doesn't provide typescript (pbc76b), requested by fork-ts-checker-webpack-plugin
➤ YN0002: │ @storybook/preset-create-react-app@npm:3.1.4 [53d9f] doesn't provide typescript (p0e128), requested by react-docgen-typescript-plugin
➤ YN0002: │ @storybook/react@npm:6.0.26 [53d9f] doesn't provide typescript (p503a5), requested by react-docgen-typescript-plugin
➤ YN0002: │ @types/redux-thunk@npm:2.1.0 doesn't provide redux (p992af), requested by redux-thunk
➤ YN0002: │ podcastindex@workspace:. doesn't provide immutable (pe6d0c), requested by connected-react-router
➤ YN0002: │ podcastindex@workspace:. doesn't provide prop-types (p3d074), requested by react-loading
➤ YN0002: │ podcastindex@workspace:. doesn't provide react-router (pefc5d), requested by connected-react-router
➤ YN0002: │ podcastindex@workspace:. doesn't provide seamless-immutable (p410e7), requested by connected-react-router
➤ YN0002: │ react-docgen-typescript-loader@npm:3.7.2 [9f7c3] doesn't provide webpack (p6f623), requested by @webpack-contrib/schema-utils
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 338ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yargs-parser@npm:10.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs-parser@npm:13.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:12.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ zwitch@npm:1.0.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:13.3.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 2s 741ms
➤ YN0000: ┌ Link step
➤ YN0007: │ core-js@npm:3.6.5 must be built because it never has been before or the last one failed
➤ YN0007: │ sharp@npm:0.25.4 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.6.5 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:2.6.11 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 15s 752ms
➤ YN0000: Done with warnings in 19s 118ms

Fix yarn dev

export NODE_OPTIONS=--openssl-legacy-provider
yarn dev

yarn dev

ℹ 「wds」: Project is running at http://localhost:9001/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /srv/web-ui/server/www
ℹ 「wds」: 404s will fallback to /index.html
node:internal/crypto/hash:101
  this[kHandle] = new _Hash(algorithm, xofLen, algorithmId, getHashCache());
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:101:19)
    at Object.createHash (node:crypto:139:10)
    at module.exports (/srv/web-ui/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/srv/web-ui/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/srv/web-ui/node_modules/webpack/lib/NormalModule.js:471:10)
    at /srv/web-ui/node_modules/webpack/lib/NormalModule.js:503:5
    at /srv/web-ui/node_modules/webpack/lib/NormalModule.js:358:12
    at /srv/web-ui/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/srv/web-ui/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/srv/web-ui/node_modules/loader-runner/lib/LoaderRunner.js:205:4) {
  opensslErrorStack: [
    'error:03000086:digital envelope routines::initialization error',
    'error:0308010C:digital envelope routines::unsupported'
  ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

node:22-trixie (Failed with errors)

➤ YN0065: Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry
➤ YN0065: Run yarn config set --home enableTelemetry 0 to disable

➤ YN0000: ┌ Resolution step
➤ YN0002: │ @mdx-js/loader@npm:1.6.18 doesn't provide react (pccc61), requested by @mdx-js/react
➤ YN0002: │ @storybook/addon-essentials@npm:6.0.26 [53d9f] doesn't provide @babel/core (p7935e), requested by @storybook/addon-docs
➤ YN0002: │ @storybook/core@npm:6.0.26 [719ac] doesn't provide typescript (pe9342), requested by fork-ts-checker-webpack-plugin
➤ YN0002: │ @storybook/core@npm:6.0.26 [fa6e2] doesn't provide typescript (pbc76b), requested by fork-ts-checker-webpack-plugin
➤ YN0002: │ @storybook/preset-create-react-app@npm:3.1.4 [53d9f] doesn't provide typescript (p0e128), requested by react-docgen-typescript-plugin
➤ YN0002: │ @storybook/react@npm:6.0.26 [53d9f] doesn't provide typescript (p503a5), requested by react-docgen-typescript-plugin
➤ YN0002: │ @types/redux-thunk@npm:2.1.0 doesn't provide redux (p992af), requested by redux-thunk
➤ YN0002: │ podcastindex@workspace:. doesn't provide immutable (pe6d0c), requested by connected-react-router
➤ YN0002: │ podcastindex@workspace:. doesn't provide prop-types (p3d074), requested by react-loading
➤ YN0002: │ podcastindex@workspace:. doesn't provide react-router (pefc5d), requested by connected-react-router
➤ YN0002: │ podcastindex@workspace:. doesn't provide seamless-immutable (p410e7), requested by connected-react-router
➤ YN0002: │ react-docgen-typescript-loader@npm:3.7.2 [9f7c3] doesn't provide webpack (p6f623), requested by @webpack-contrib/schema-utils
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 339ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yargs-parser@npm:10.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs-parser@npm:13.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:12.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:13.3.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ zwitch@npm:1.0.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 38s 167ms
➤ YN0000: ┌ Link step
➤ YN0007: │ core-js@npm:3.6.5 must be built because it never has been before or the last one failed
➤ YN0007: │ sharp@npm:0.25.4 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.6.5 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:2.6.11 must be built because it never has been before or the last one failed
➤ YN0009: │ sharp@npm:0.25.4 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-951f88d5/build.log)
➤ YN0000: └ Completed in 18s 530ms
➤ YN0000: Failed with errors in 57s 345ms

Instruction to update the readme when working

git clone https://github.com/Podcastindex-org/web-ui.git
cd web-ui
cp .env-example .env
cp .env-example .environments/.env.development

#yarn exec env
corepack -v && export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
corepack enable

yarn install
export NODE_OPTIONS=--openssl-legacy-provider
yarn dev
yarn start

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions