Skip to content

Commit

Permalink
Merge pull request #309 from CybercentreCanada/feature/updated_python…
Browse files Browse the repository at this point in the history
…_debian

Use python3.9 and debian buster
  • Loading branch information
cccs-sgaron authored Jul 29, 2021
2 parents 5fb7f7b + 99f5e05 commit 2908791
Show file tree
Hide file tree
Showing 8 changed files with 221 additions and 227 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-slim-stretch AS base
FROM python:3.9-slim-buster AS base

# Get required apt packages
RUN apt-get update \
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ AssemblyLine 4 is an open source malware analysis framework. It leverages Kubern

AssemblyLine can be easily integrated in your environment using it’s powerful rest API and web interfaces. The platform comes with dozens of services to provide deep file analysis and enable integration with other security platforms such as anti-virus, malware-detonation sandboxes and threat knowledge bases. Best of all, with a little bit of Python code you can extend it yourself by creating new analysis and integration services.

### Repository information
### Repository information

This is Assemblyline 4 base repository. It provides Assemblyline with common libraries, cachestore, datastore, filestore, ODM and remote datatypes.

#### System requirements

Assemblyline 4 will only work on systems running python3.7+ and was only tested on linux systems.
Assemblyline 4 will only work on systems running python3.9 and was only tested on linux systems.

#### Installation requirements

If used outside of our normal container this library requires outside linux libraries.
* libffi6 (dev)
* libfuxxy2 (dev)
* libmagic1
* python3.7 (dev)

Here is an example on how you would get those libraries on a `Ubuntu 18.04+` system:

sudo apt install libffi6 libfuzzy2 libmagic1 build-essential libffi-dev python3.7 python3-dev python3-pip libfuzzy-dev
- libffi6 (dev)
- libfuxxy2 (dev)
- libmagic1
- python3.9 (dev)

Here is an example on how you would get those libraries on a `Ubuntu 20.04+` system:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install libffi6 libfuzzy2 libmagic1 build-essential libffi-dev python3.9 python3.9-dev python3-pip libfuzzy-dev
24 changes: 12 additions & 12 deletions docker/al_dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-slim-stretch
FROM python:3.9-slim-buster
# NOTE: to build this container you must be in a directory where assemblyline-base, assemblyline-ui,
# assemblyline-core, assemblyline-service-server and assemblyline-service-client code is checked out

Expand All @@ -10,16 +10,16 @@ RUN apt-get update && apt-get install -yy build-essential libffi-dev libfuzzy-de

# Python packages requirements
RUN pip install --no-cache-dir \
assemblyline[test] \
assemblyline-core \
assemblyline-ui \
assemblyline-service-server \
&& pip uninstall -y \
assemblyline \
assemblyline-core \
assemblyline-ui \
assemblyline-service-server \
&& rm -rf ~/.cache/pip
assemblyline[test] \
assemblyline-core \
assemblyline-ui \
assemblyline-service-server \
&& pip uninstall -y \
assemblyline \
assemblyline-core \
assemblyline-ui \
assemblyline-service-server \
&& rm -rf ~/.cache/pip


# Create Assemblyline source directory
Expand All @@ -32,4 +32,4 @@ RUN mkdir -p /var/log/assemblyline
RUN mkdir -p /opt/alv4
WORKDIR /opt/alv4

CMD pip list
CMD pip list
4 changes: 2 additions & 2 deletions docker/al_management/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-slim-stretch
FROM python:3.9-slim-buster

# Make sure root account is locked so 'su' commands fail all the time
RUN passwd -l root
Expand Down Expand Up @@ -36,7 +36,7 @@ USER assemblyline
RUN python -m venv /var/lib/assemblyline/venv

# Install packages in the venv
RUN /bin/bash -c "source /var/lib/assemblyline/venv/bin/activate && pip install --no-cache-dir --upgrade pip wheel && pip install --no-cache-dir assemblyline assemblyline_core assemblyline_ui assemblyline-client==4.0.0b4 ipython jupyter"
RUN /bin/bash -c "source /var/lib/assemblyline/venv/bin/activate && pip install --no-cache-dir --upgrade pip wheel && pip install --no-cache-dir assemblyline assemblyline_core assemblyline_ui assemblyline-client ipython jupyter"

# Setup venv when bash is launched
RUN echo "source /var/lib/assemblyline/venv/bin/activate" >> /var/lib/assemblyline/.bashrc
Expand Down
6 changes: 3 additions & 3 deletions docker/local_dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM python:3.7-slim
FROM python:3.9-slim-buster

# SSDEEP pkg requirments
RUN apt-get update -yy \
&& apt-get install -yy build-essential libffi-dev libfuzzy-dev libldap2-dev libsasl2-dev libmagic1 \
&& rm -rf /var/lib/apt/lists/*
&& apt-get install -yy build-essential libffi-dev libfuzzy-dev libldap2-dev libsasl2-dev libmagic1 \
&& rm -rf /var/lib/apt/lists/*

# Create Assemblyline source directory
RUN mkdir -p /etc/assemblyline
Expand Down
Loading

0 comments on commit 2908791

Please sign in to comment.