Secure-Compliance-Solutions-LLC / GVM-Docker

Greenbone Vulnerability Management Docker Image with OpenVAS
https://securecompliance.gitbook.io/projects/
MIT License
246 stars 91 forks source link

[Bug] Docker fails to build with COPY failed: stat /var/lib/docker/tmp/docker-builder211072295/apk-build/target: no such file or directory #270

Closed nestoru closed 2 years ago

nestoru commented 3 years ago

Describe the bug Docker fails to build with COPY failed: stat /var/lib/docker/tmp/docker-builder211072295/apk-build/target: no such file or directory

This was working last time I checked three months ago.

To Reproduce Steps to reproduce the behavior:

  1. Run the below: docker build . -t gvm

  2. See error: COPY failed: stat /var/lib/docker/tmp/docker-builder211072295/apk-build/target: no such file or directory

Expected behavior The docker image should build.

Host Device:

Image in use:

Dexus commented 3 years ago

It’s not a bug, you need to download the artifact from the apk build repo.

Regards

Von meinem iPhone gesendet

Am 03.09.2021 um 14:05 schrieb Nestor Urquiza @.***>:

 Describe the bug Docker fails to build with COPY failed: stat /var/lib/docker/tmp/docker-builder211072295/apk-build/target: no such file or directory

This was working last time I checked three months ago.

To Reproduce Steps to reproduce the behavior:

Run the below: docker build . -t gvm

See error: COPY failed: stat /var/lib/docker/tmp/docker-builder211072295/apk-build/target: no such file or directory

Expected behavior The docker image should build.

Host Device:

OS: Ubuntu Version: 20.04.2 LTS Image in use:

Self build Output from docker image inspect : $ docker image inspect gvm [] Error: No such image: gvm — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or unsubscribe.

austinsonger commented 3 years ago

@Dexus can we make a note of this somewhere so it's obvious for users.

Dexus commented 3 years ago

Sure after my vacation I will work on the Debian image and will also add the notes to the docs.

Von meinem iPhone gesendet

Am 03.09.2021 um 17:21 schrieb Austin Songer @.***>:

 @Dexus can we make a note of this somewhere so it's obvious for users.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

nestoru commented 3 years ago

If I can have at least the list of commands to run to get the apk build repo artifact downloaded that will be great. I cloned https://github.com/Secure-Compliance-Solutions-LLC/GVM-APK-build.git and run the make command and got the below

Successfully built e1eb521db1a8
Successfully tagged apk_builder:nurquiza

but I have no idea what to do next because I still do not see an apk-build directory which is needed by the Dockerfile in the GVM-Docker repo:

COPY apk-build/target/ /repo/
COPY apk-build/user.abuild/*.pub /etc/apk/keys/
Dexus commented 3 years ago

Have a look to the action pipelines of the repo. Or clone it and run make user.abuilder and make build

Von meinem iPhone gesendet

Am 04.09.2021 um 16:35 schrieb Nestor Urquiza @.***>:

 If I can have at least the list of commands to run to get the apk build repo artifact downloaded that will be great. I cloned https://github.com/Secure-Compliance-Solutions-LLC/GVM-APK-build.git and run the make command and got the below

Successfully built e1eb521db1a8 Successfully tagged apk_builder:nurquiza but I have no idea what to do next because I still do not see an apk-build directory which is needed by the Dockerfile in the GVM-Docker repo:

COPY apk-build/target/ /repo/ COPY apk-build/user.abuild/*.pub /etc/apk/keys/ — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

nestoru commented 3 years ago

make build was failing because the docker image is run in non interactive mode and yet asking the user to confirm where the encryption key should be placed. After adding -ti I started getting mkdir: can't create directory '/target/community/': Permission denied which I assume might be the result of some var missing. I decided not to build from sources and instead run from the published latest image as shown in https://github.com/Secure-Compliance-Solutions-LLC/GVM-Docker/issues/281 but that was also an unsuccessful attempt to get GVM working.

Direction on how to continue here will be highly appreciated.

austinsonger commented 3 years ago

@nestoru I've done some rearranging of the documentation today and will adding more context this coming week.

nestoru commented 3 years ago

@austinsonger appreciate it!

austinsonger commented 2 years ago

Have switch to Debian. Closing this.

nestoru commented 2 years ago

@austinsonger could you please share how we can build for debian? I just tried to build the image as explained in the first post in this thread and got the same result. Every other interaction is still valid here. I believe we need step by step instructions about how to build the docker image. Happy to help on my end as needed. For now I am using the published securecompliance/gvm:debian-master-data-full image but it would be great if we can build this from scratch. Thanks for the hard work on this guys!