Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

galoget
Copy link
Contributor

@galoget galoget commented Jan 16, 2025

Overview of Changes

  • Updated Dockerfile and requirements.txt

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

So, I updated the files to fix dependency issues.

Testing

I tested it and it works fine after my changes.
cloudgoat-dockerfile-python-fixed

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.

@nobodynate
Copy link
Contributor

@galoget can you provide the command that produced the errors in the screenshot?

docker build on Ubuntu is currently working.

@galoget
Copy link
Contributor Author

galoget commented Jan 16, 2025

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

image

requirements.txt Outdated
@@ -2,8 +2,8 @@
# black==19.3b0
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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' \
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

@andrew-aiken
Copy link
Contributor

Could we switch to using hashicorp/terraform:latest as the base image?
The image seems to be only build for arm64 so the binary will not work on x86 systems. Using the terraform container image we don't have to setup TF and it will support both architectures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants