fkie-cad / fkie-cad/FACT_docker

Problem: Docker with Namespace-Remapping

Open
#23 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
29
Forks
11
PR merge metrics
No merged PRs in 30d

Description

As wished in https://github.com/fkie-cad/FACT_docker/issues/22 here is the issue to track the mentioned Problem down.

I am using Docker namespace remapping. I was able to solve the issues within the containers that are in the docker-compose.yml by adding " userns_mode: "host" " for each container as far as I could observe so far.

However, start.py loads the fact extraction container, but this fails because it seems to start without the "userns_mode: "host" " parameter. See also https://github.com/fkie-cad/FACT_core/issues/794. This looks very much like the same problem.
```
./start.py pull

[2022-07-29 13:33:41][install][INFO]: FACT Installer 1.2
[2022-07-29 13:33:41][install][INFO]: Your distribution (alpine 3.15.5) is not supported. FACT Installer requires Ubuntu 18.04, 20.04 or compatible!
[2022-07-29 13:33:41][backend][INFO]: Pulling fact extraction container
Traceback (most recent call last):
File "/opt/FACT_core/src/install.py", line 187, in .
install()
File "/opt/FACT_core/src/install.py", line 156, in install
install_docker_images(args)
File "/opt/FACT_core/src/install.py", line 180, in install_docker_images
backend_install_docker_images()
File "/opt/FACT_core/src/install/backend.py", line 80, in _install_docker_images
raise InstallationError(f'Failed to pull extraction container:\n{docker_process.stdout}')
helperFunctions.install.InstallationError: Failed to pull extraction container:
Using default tag: latest
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/create?fromImage=fkiecad%2Ffact_extractor&tag=latest": dial unix /var/run/docker.sock: connect: permission denied
```

Maybe modifying the file metioned in https://github.com/fkie-cad/FACT_core/issues/794 could help?!

I will need to setup Namespace-Remapping on my non-dockerized FACT, than i could try and hopefully get any new information.
I'll report back as soon as i can.

Thanks again!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing ./start.py pull with Docker namespace remapping and read start.py, docker-compose.yml, src/install.py, and src/install/backend.py. Compare the extraction-container path with the containers defined in docker-compose.yml, using FACT_core issue 794 for context. Done means the extraction container can be pulled and started successfully under the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.