-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated Dockerfile and requirements.txt #291
base: master
Are you sure you want to change the base?
Conversation
@galoget can you provide the command that produced the errors in the screenshot?
|
@nobodynate yeah sure, this is the command: docker build -t cloudgoat:2.0.0 . I executed it on a Debian-based OS as mentioned before. The build process will succeed but in the output you will find those errors related with Python dependencies. Meaning that even after creating the image, you won't have a proper installed environment. |
requirements.txt
Outdated
@@ -2,8 +2,8 @@ | |||
# black==19.3b0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also update is requirements.txt with the new versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I will update the dev requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, also updated the Python version in the Dockerfile as Python 3.8 has reached its end of life (EOL) as of October 7, 2024.
References:
|
||
LABEL maintainer="Rhino Assessment Team <[email protected]>" | ||
LABEL cloudgoat.version="2.0.0" | ||
|
||
RUN apk add --no-cache --update bash bash-completion docker-bash-completion openssh curl | ||
|
||
# Install Terraform and AWS CLI | ||
RUN wget -O terraform.zip 'https://releases.hashicorp.com/terraform/1.3.9/terraform_1.3.9_linux_arm64.zip' \ | ||
RUN wget -O terraform.zip 'https://releases.hashicorp.com/terraform/1.10.0/terraform_1.10.0_linux_arm64.zip' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make sure that 1.10 is backwards compatible with all scenarios.
It looks like 0.14 is what everything "should" support.
I think we should probably increase the minimum TF version (@nobodynate)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on what I searched, Terraform v1.10 honors the Terraform v1.0 Compatibility Promises.
References:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can also update the TF version in the README.md if you agree.
…ibraries in requirements.txt
Could we switch to using |
Overview of Changes
The current Dockerfile was not working as is anymore (tested on Kali Linux 2024.4), it always showed this error message during the building process.
![cloudgoat-dockerfile-python-errors](https://private-user-images.githubusercontent.com/8353133/404043885-77364566-d5b7-4162-ad46-845a18b874d9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MjE5NTksIm5iZiI6MTczODgyMTY1OSwicGF0aCI6Ii84MzUzMTMzLzQwNDA0Mzg4NS03NzM2NDU2Ni1kNWI3LTQxNjItYWQ0Ni04NDVhMThiODc0ZDkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDZUMDYwMDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWVlM2VkMzdjOTI1ZWI1ZDA1ODM4MzE3NmI4YmIwMGVjNjFmMmUxNTY1MmZmNzkwZDJkMjEwM2RlMmYzZjFmZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.xCRzzLou7mWlS2x61bKmRBL8G_HLF1aeuXUWw4guKWE)
So, I updated the files to fix dependency issues.
Testing
I tested it and it works fine after my changes.
![cloudgoat-dockerfile-python-fixed](https://private-user-images.githubusercontent.com/8353133/404044658-9bb38488-0273-406f-b9e4-5c92e3312ede.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MjE5NTksIm5iZiI6MTczODgyMTY1OSwicGF0aCI6Ii84MzUzMTMzLzQwNDA0NDY1OC05YmIzODQ4OC0wMjczLTQwNmYtYjllNC01YzkyZTMzMTJlZGUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDZUMDYwMDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTJkODFkMGYyYzg4MTU4Mzk4YmZhNjgzODcwZmRhYzRmNjk4NjVhYTZlOTU5Yjc5ODZjMzE1OWM1MTdjMWJmZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.VgbZ-68-HSVr4AJOGwbEGSDjE0jeojwQf5VexItqD70)
I did not change the files to the latest version of the software in order to avoid having any bugs, so, I chose some versions that are more recent, have security fixes and are stable enough.