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

Optimize image size #3070

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ ADD . .
RUN if [ -z "$(ls plugins/stockpile)" ]; then echo "stockpile plugin not downloaded - please ensure you recursively cloned the caldera git repository and try again."; exit 1; fi

RUN apt-get update && \
apt-get -y install python3 python3-pip python3-venv git curl golang-go
apt-get -y --no-install-recommends install python3 python3-pip python3-venv git curl golang-go


#WIN_BUILD is used to enable windows build in sandcat plugin
ARG WIN_BUILD=false
RUN if [ "$WIN_BUILD" = "true" ] ; then apt-get -y install mingw-w64; fi
RUN if [ "$WIN_BUILD" = "true" ] ; then apt-get -y --no-install-recommends install mingw-w64; fi

# Set up python virtualenv
ENV VIRTUAL_ENV=/opt/venv/caldera
Expand Down Expand Up @@ -69,17 +69,17 @@ fi
WORKDIR /usr/src/app/plugins/emu

# If emu is enabled, complete necessary installation steps
RUN if [ $(grep -c "\- emu" ../../conf/local.yml) ]; then \
apt-get -y install zlib1g unzip; \
pip3 install -r requirements.txt; \
./download_payloads.sh; \
RUN if [ $(grep -c "\- emu" ../../conf/local.yml) ]; then \
apt-get -y --no-install-recommends install zlib1g unzip; \
pip3 install -r --no-cache-dir requirements.txt; \
./download_payloads.sh; \
fi

WORKDIR /usr/src/app

# Install Node.js, npm, and other build VueJS front-end
RUN apt-get update && \
apt-get install -y nodejs npm && \
apt-get install -y --no-install-recommends nodejs npm && \
# Directly use npm to install dependencies and build the application
(cd plugins/magma && npm install) && \
(cd plugins/magma && npm run build) && \
Expand Down
Loading