fkie-cad / FACT_docker

Dockerfile for building the FACT container
GNU General Public License v3.0
21 stars 10 forks source link

Can't pull Containers #22

Closed SonicFM closed 1 year ago

SonicFM commented 1 year ago

Branch: fact4.0

First of all thanks for providing FACT_core as well as FACT_docker!

I'm trying to setup FACT_docker with Branch fact4.0 as described in "Usage", but sadly i already failed at the first command.

docker pull ghcr.io/fkie-cad/fact-core-frontend:4.0 Error response from daemon: Head "https://ghcr.io/v2/fkie-cad/fact-core-frontend/manifests/4.0": denied and ./start.py pull Unable to find image 'fkie-cad/fact-core-scripts:4.0' locally docker: Error response from daemon: pull access denied for fkie-cad/fact-core-scripts, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

What am i missing here? Or is it even my fault?

Is there an projected timeline when FACT will be available over docker hub? As stated in https://github.com/fkie-cad/FACT_docker/pull/20 there is https://hub.docker.com/search?q=maringuu. Should i try these instead?

Thanks in advance!

maringuu commented 1 year ago

Hello! Thank you for your interest in FACT and FACT_docker. The problem is that the docker images are still not released by the fkie-cad account. Once the PR is merged the images will be released.

As stated in https://github.com/fkie-cad/FACT_docker/pull/20 there is https://hub.docker.com/search?q=maringuu. Should i try these instead?

Exactly right! These are the images that are build by github actions on my fork. They are equivalent to the images pointed out in the readme, since the PR is ready and only waits for a final review. Note that the scripts also have to be adpted to use the right images:

sed -i s/fkie-cad/maringuu/ docker-compose.yml
sed -i s/fkie-cad/maringuu/ start.py

Closing this issue as the problem is hopefully solved and is about a development branch. Feel free to reopen if it still does not work.

If you encounter anything that does not work as expected we are happy if you tell us! So if you have the time to spare just comment on the PR. Thanks!

Edit: As for the timeline I think that they might be released next week or so.

SonicFM commented 1 year ago

Hello maringuu, thank you for your quick reply!

Changing the docker-compose.yml and the start.py worked, thanks a lot!

But I have another error, even if I know where it comes from I unfortunately do not know how to fix it.

I use docker namespace remapping the problems inside the containers which are in the docker-compose.yml I could solve by setting " userns_mode: "host" " for each container.

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 <module>.
    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

Is there any way I can solve this myself/locally? I'm sure it wouldn't hurt to find a "public" solution for this as well, since others would have the same problem using docker's namespace remapping.

BTW: I'm unable to reopen this issue. Should i create another one, since its basicly another Problem?

Thanks again!

maringuu commented 1 year ago

Hmm I haven't investigated much but is it possible that --group-add does not work in combination with usernamespaces? The start.py scripts adds the gid of the docker host this way. Maybe this does not work. Please open another issue to track this. This problem is seperate from this one.

cosad3s commented 1 year ago

Hello! Thank you for your interest in FACT and FACT_docker. The problem is that the docker images are still not released by the fkie-cad account. Once the PR is merged the images will be released.

As stated in #20 there is https://hub.docker.com/search?q=maringuu. Should i try these instead?

Exactly right! These are the images that are build by github actions on my fork. They are equivalent to the images pointed out in the readme, since the PR is ready and only waits for a final review. Note that the scripts also have to be adpted to use the right images:

sed -i s/fkie-cad/maringuu/ docker-compose.yml
sed -i s/fkie-cad/maringuu/ start.py

Closing this issue as the problem is hopefully solved and is about a development branch. Feel free to reopen if it still does not work.

If you encounter anything that does not work as expected we are happy if you tell us! So if you have the time to spare just comment on the PR. Thanks!

Edit: As for the timeline I think that they might be released next week or so.

Still have the issue for information :) Thanks for the workaround

maringuu commented 1 year ago

@jstucke Gentle Ping

cosad3s commented 1 year ago

After the workaround applied, it is still not work ... After some minutes of preparation I get this error:

./start.py pull
[2022-10-13 07:06:56][install][INFO]: FACT Installer 1.2
[2022-10-13 07:06:56][install][INFO]: Your Distribution (alpine 3.15.6) is not supported. FACT Installer requires Ubuntu 18.04, 20.04 or compatible!
[2022-10-13 07:06:56][backend][INFO]: Pulling fact extraction container
[2022-10-13 07:09:42][install][CRITICAL]: Your Distribution (alpine 3.15.6) is not supported. FACT Installer requires Ubuntu 18.04, 20.04 or compatible!

I am running it on a Kali, but I think this error comes from a container right ?

# uname -a    
Linux cactus-ths 5.18.0-kali5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.5-1kali6 (2022-07-07) x86_64 GNU/Linux

Kind of conflict ? Between:

maringuu commented 1 year ago

After some minutes of preparation I get this error

See #24, you can ignore the error message.

Also the images were just published :)

cosad3s commented 1 year ago

Thanks. Authentication is needed ?

I followed https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry and add read:packages scope for a new token.

# echo $CR_PAT | docker login ghcr.io -u cosad3s --password-stdin
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
# docker pull ghcr.io/fkie-cad/fact-core-frontend:4.0.1          
Error response from daemon: denied
maringuu commented 1 year ago

Thanks. Authentication is needed ?

Whoops, we forgot to make the images public... The are now available. So just follow the instructions in the README and you are good to go

infinite2005qian commented 1 year ago

Collaborator

how you solved it?

After the workaround applied, it is still not work ... After some minutes of preparation I get this error:

./start.py pull
[2022-10-13 07:06:56][install][INFO]: FACT Installer 1.2
[2022-10-13 07:06:56][install][INFO]: Your Distribution (alpine 3.15.6) is not supported. FACT Installer requires Ubuntu 18.04, 20.04 or compatible!
[2022-10-13 07:06:56][backend][INFO]: Pulling fact extraction container
[2022-10-13 07:09:42][install][CRITICAL]: Your Distribution (alpine 3.15.6) is not supported. FACT Installer requires Ubuntu 18.04, 20.04 or compatible!

I am running it on a Kali, but I think this error comes from a container right ?

# uname -a    
Linux cactus-ths 5.18.0-kali5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.5-1kali6 (2022-07-07) x86_64 GNU/Linux

Kind of conflict ? Between:

how you solved it?

maringuu commented 1 year ago

We should probably print a success message but as I stated above you can ignore this error.

See https://github.com/fkie-cad/FACT_docker/issues/24, you can ignore the error message.