x_old_misp_docker icon indicating copy to clipboard operation
x_old_misp_docker copied to clipboard

Unable to build MISP Web Service

Open notmonalisa opened this issue 5 years ago • 7 comments
trafficstars

lsb_release unable to find inside the focal ubuntu image that leads in unsuccessful exit and builds faulty docker image.

notmonalisa avatar Oct 19 '20 05:10 notmonalisa

Here is the log: ` Step 8/11 : RUN bash /tmp/INSTALL.sh -c ---> Running in bc65a7679e68 Next step: Checking if we are run as the installer template Next step: Checking Linux distribution and flavour... /tmp/INSTALL.sh: line 332: lsb_release: command not found Next step: We detected the following Linux flavour: Ubuntu Next step: Checking if we are uptodate and checksums match tput: No value for $TERM and no -T specified

Next step: Setting MISP variables Next step: Setting generic MISP variables shared by all flavours groups: 'misp': no such user The following DB Passwords were generated... Admin (root) DB Password: 5b212ac7ec78a01c03a45d7bbdd973195895e8f99db051693b59f27b3d33612a User (misp) DB Password: 12a7bdfde6659fc9ba83611b067f4e60baa5b1007aa23be31663f34ceda25f92 Next step: Checking for parameters or Unattended Kali Install Next step: Setting install options with given parameters. core /tmp/INSTALL.sh: line 3299: lsb_release: command not found Installation done! Removing intermediate container bc65a7679e68 ---> 00a860583682 Step 9/11 : VOLUME /var/www/MISP `

notmonalisa avatar Oct 20 '20 06:10 notmonalisa

I tried adding lsb-release to this line https://github.com/MISP/misp-docker/blob/14fbecf1c90c526f8de5fe9abf52422abfc02060/web/Dockerfile#L5

But then it just fails during the build.

Next step: Checking if run as root and misp is This script cannot be run as a root
rm: cannot remove '/tmp/INSTALL.sh.*': No such file or directory
ERROR: Service 'web' failed to build: The command '/bin/sh -c bash /tmp/INSTALL.sh -c' returned a non-zero code: 1

Earlier on there are also other errors

tput: No value for $TERM and no -T specified

groups: 'misp': no such user

/tmp/INSTALL.sh: line 694: ip: command not found

I'll continue digging tomorrow if no one else has found a fix

helinko avatar Oct 20 '20 17:10 helinko

Sure. I'm looking into it as well. But sad thing about that INSTALL script is that it requires some command(s) to be executed which is weird within the docker image/container like the ip command and others without tinkering around a little bit.

notmonalisa avatar Oct 21 '20 02:10 notmonalisa

Yeah it might be that this is part of a bigger problem, i.e. running install.sh in the container, since it's not intended to be run there. Even in the PR #79 that introduced it, @stevengoossensB says the changes should probably be in a different branch since it's a work in progress. I expect that even if we manage to patch this now, they may just change it upstream tomorrow and then it breaks again.

helinko avatar Oct 21 '20 11:10 helinko

Looks like this is also a duplicate of #90

helinko avatar Oct 21 '20 11:10 helinko

Hi,

I created a new PR to revert the changes. I'm indeed still working on the Docker container with the INSTALL script, which indeed requires some tinkering and changes to the INSTALL script to get this fully running.

stevengoossensB avatar Oct 21 '20 12:10 stevengoossensB

Should be fixed in https://github.com/stevengoossensB/misp-docker/tree/revert-79-master @helinko tested this as well. If you want a container that is already built, you can also use stevengoossens/misp:patched on dockerhub. Now just waiting until the PR is merged.

stevengoossensB avatar Oct 29 '20 18:10 stevengoossensB