SK-CERT / Taranis-NG

Taranis NG is an OSINT gathering and analysis tool for CSIRT teams and organisations. It allows team-to-team collaboration, and contains a user portal for simple self asset management. Taranis NG was developed by SK-CERT with a help from wide CSIRT community.
European Union Public License 1.2
99 stars 21 forks source link

gui container: invalid openssl option in NODE_OPTIONS #126

Open sebix opened 1 year ago

sebix commented 1 year ago

At building the gui container using branch main, I get the following error:

Step 11/24 : ENV NODE_OPTIONS=--openssl-legacy-provider
 ---> Running in 23162772aedd
Removing intermediate container 23162772aedd
 ---> 27f722440ae2
Step 12/24 : RUN npm run build
 ---> Running in e8580fc51d6b
node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
The command '/bin/sh -c npm run build' returned a non-zero code: 9
ERROR: Service 'gui' failed to build : Build failed

This is the affected code: https://github.com/SK-CERT/Taranis-NG/blob/9403d56501b7410c6f2156ffd609c204c40b9c33/docker/Dockerfile.gui#L15-L16

Removing the env lets the build succeed.

There wasn't a change in this Dockerfile since November, so maybe an updated package causes this now? If you can reproduce the issue and think that removing ENV NODE_OPTIONS=--openssl-legacy-provider is the correct solution, I can create a PR fixing it.

dodancs commented 1 year ago

Hi @sebix , have you tried pulling the latest base image? This was added because newer versions of node had issues building the GUI without it! Try running this before building the container:

docker pull node:lts-alpine

or try updating also all base images with:

docker-compose -f docker/docker-compose.yml build --pull

see: https://github.com/SK-CERT/Taranis-NG/issues/108

sebix commented 1 year ago

I forgot to add that I used branch main.

If a specific version of the docker image is required, I suggest adding the required tag to the Dockerfile

dodancs commented 1 year ago

Well, I think we should always stay up to date, and fix these kinds of issues step by step. But yeah, it is a good suggestion to stabilize the version so that when somebody tries to build the containers with outdated images, it will automatically grab the new ones.

sebix commented 1 year ago

Well, I think we should always stay up to date,

I fully agree with you.

If the docker image would provide lts-like tags / major version tags, so that security updates are automatically pulled, but no breaking updates, that'd be ideal. But for alpine these are dreams :D