-
Notifications
You must be signed in to change notification settings - Fork 331
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
#1363, #1347: Make docker-compose the preferred way to try cartography #1364
base: master
Are you sure you want to change the base?
Conversation
This still needs more work, Docker is weird. |
cc: @hatchetation -- I think this addresses the doc bugs you brought up. I think it makes sense to have docker-compose be the main way to try out cartography. |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3.10-dev python3-pip python3-setuptools openssl libssl-dev gcc pkg-config libffi-dev libxml2-dev libxmlsec1-dev curl make git && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
COPY . /var/cartography |
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.
For Production docker image, we must install Cartography from PyPI.
|
||
# Installs pip supported by python3.10 | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.10 get-pip.py | ||
RUN pip install -U -e . |
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.
Production install should not use --editable
.
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.
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.
Are you saying that we should make it
RUN pip install .
instead? I think that works.
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.
pip install cartography
Docker steps should be the exact commands that we will use to setup a production environment on a bare Linux host, it is just that the image has everything the environment made up of such as Python, Cartography package installed with all its production dependencies only (no package that are required for dev/test).
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.
Mm, maybe I will add back the dev.Dockerfile then.
dev.Dockerfile will run an editable install
Dockerfile will install the latest release
Summary
Addresses #1363 and #1347.
Checklist
Provide proof that this works (this makes reviews move faster). Please perform one or more of the following:
Proof that this works
Building the image
Running an AWS sync using docker-compose
CLI used: