ARG RELEASE |
ARG LAUNCHPAD_BUILD_ARCH |
LABEL org.opencontainers.image.ref.name=ubuntu |
LABEL org.opencontainers.image.version=22.04 |
ADD file:bb1fa1d9d012ae826908afdce8c9fa2feebf221b2ab032e1535255905144411a in / |
CMD ["/bin/bash"] |
SHELL [/bin/bash -c] |
ARG TZ=UTC |
RUN |1 TZ=UTC /bin/bash -c ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # buildkit |
WORKDIR /usr/src/app |
ADD . . # buildkit |
RUN |1 TZ=UTC /bin/bash -c 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 # buildkit |
RUN |1 TZ=UTC /bin/bash -c apt-get update && apt-get -y install python3 python3-pip git curl # buildkit |
ARG WIN_BUILD=false |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c if [ "$WIN_BUILD" = "true" ] ; then apt-get -y install mingw-w64; fi # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c pip3 install --no-cache-dir -r requirements.txt # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c python3 -c "import app; import app.utility.config_generator; app.utility.config_generator.ensure_local_config();"; sed -i '/\- atomic/d' conf/local.yml; # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c curl -L https://go.dev/dl/go1.17.6.linux-amd64.tar.gz -o go1.17.6.linux-amd64.tar.gz # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.6.linux-amd64.tar.gz; # buildkit |
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c go version; # buildkit |
WORKDIR /usr/src/app/plugins/sandcat |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c if [ "$WIN_BUILD" = "true" ] ; then cp ./update-agents.sh ./update-agents-copy.sh; fi # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c if [ "$WIN_BUILD" = "true" ] ; then tr -d '\15\32' < ./update-agents-copy.sh > ./update-agents.sh; fi # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c if [ "$WIN_BUILD" = "true" ] ; then rm ./update-agents-copy.sh; fi # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c ./update-agents.sh # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c mkdir /tmp/gocatextensionstest # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c cp -R ./gocat /tmp/gocatextensionstest/gocat # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c cp -R ./gocat-extensions/* /tmp/gocatextensionstest/gocat/ # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c cp ./update-agents.sh /tmp/gocatextensionstest/update-agents.sh # buildkit |
WORKDIR /tmp/gocatextensionstest |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c mkdir /tmp/gocatextensionstest/payloads # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c ./update-agents.sh # buildkit |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c if [ ! -d "/usr/src/app/plugins/atomic/data/atomic-red-team" ]; then git clone --depth 1 https://github.com/redcanaryco/atomic-red-team.git /usr/src/app/plugins/atomic/data/atomic-red-team; fi # buildkit |
WORKDIR /usr/src/app/plugins/emu |
RUN |2 TZ=UTC WIN_BUILD=true /bin/bash -c if [ $(grep -c "\- emu" ../../conf/local.yml) ]; then apt-get -y install zlib1g unzip; pip3 install -r requirements.txt; ./download_payloads.sh; fi # buildkit |
WORKDIR /usr/src/app |
EXPOSE map[8888/tcp:{}] |
EXPOSE map[8443/tcp:{}] |
EXPOSE map[7010/tcp:{}] |
EXPOSE map[7011/udp:{}] |
EXPOSE map[7012/tcp:{}] |
EXPOSE map[8853/tcp:{}] |
EXPOSE map[8022/tcp:{}] |
EXPOSE map[2222/tcp:{}] |
ENTRYPOINT ["python3" "server.py"] |