Skip to content

Instantly share code, notes, and snippets.

@giuliohome
Last active February 28, 2024 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giuliohome/f8612fc663225d49be79296302c03ff6 to your computer and use it in GitHub Desktop.
Save giuliohome/f8612fc663225d49be79296302c03ff6 to your computer and use it in GitHub Desktop.
alpine node container to build and test react without ssl verification
npm set strict-ssl false
npm install npm@8.19.2 -g
cd my
yarn set version berry
yarn install
yarn build
yarn run lint
docker build -t mynode16 .
docker run -it --rm localhost/mynode16 /bin/sh
FROM node:16.14.0-alpine
RUN mkdir my
RUN echo enableStrictSsl: false > ./my/.yarnrc.yml
COPY fe-react-01/yarn.lock ./my
COPY fe-react-01/src ./my/src
COPY fe-react-01/.yarn ./my/.yarn
COPY fe-react-01/tsconfig.json ./my
COPY fe-react-01/package.json ./my
COPY fe-react-01/public ./my/public
@giuliohome
Copy link
Author

giuliohome commented Feb 28, 2024

export OPENSSL_CONF=/etc/ssl/openssl.cnf
export SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION=1

does not work

https://stackoverflow.com/questions/75763525/curl-35-error0a000152ssl-routinesunsafe-legacy-renegotiation-disabled/76012131#comment137640537_76012131

solved ONLY with wifi hotspot instead of intranet usb-c and vpn on (even with NODE_TLS_REJECT_UNAUTHORIZED=1 and all the standard settings because in that case the internet certificates are as expected)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment