mirror of https://github.com/MISP/misp-docker
Some code style fixes
parent
3b28ac6833
commit
5a28107595
|
@ -33,31 +33,31 @@ FROM debian:buster-slim as python-build
|
||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
RUN git clone --depth 1 https://github.com/CybOXProject/mixbox.git; \
|
RUN git clone --depth 1 https://github.com/CybOXProject/mixbox.git; \
|
||||||
cd mixbox; python3 setup.py bdist_wheel -d /wheels
|
cd mixbox || exit; python3 setup.py bdist_wheel -d /wheels
|
||||||
|
|
||||||
# install python-maec
|
# install python-maec
|
||||||
RUN git clone --depth 1 https://github.com/MAECProject/python-maec.git; \
|
RUN git clone --depth 1 https://github.com/MAECProject/python-maec.git; \
|
||||||
cd python-maec; python3 setup.py bdist_wheel -d /wheels
|
cd python-maec || exit; python3 setup.py bdist_wheel -d /wheels
|
||||||
|
|
||||||
# install python-cybox
|
# install python-cybox
|
||||||
RUN git clone --depth 1 https://github.com/CybOXProject/python-cybox.git; \
|
RUN git clone --depth 1 https://github.com/CybOXProject/python-cybox.git; \
|
||||||
cd python-cybox; python3 setup.py bdist_wheel -d /wheels
|
cd python-cybox || exit; python3 setup.py bdist_wheel -d /wheels
|
||||||
|
|
||||||
# install python stix
|
# install python stix
|
||||||
RUN git clone --depth 1 https://github.com/STIXProject/python-stix.git; \
|
RUN git clone --depth 1 https://github.com/STIXProject/python-stix.git; \
|
||||||
cd python-stix; python3 setup.py bdist_wheel -d /wheels
|
cd python-stix || exit; python3 setup.py bdist_wheel -d /wheels
|
||||||
|
|
||||||
# install STIX2.0 library to support STIX 2.0 export:
|
# install STIX2.0 library to support STIX 2.0 export:
|
||||||
RUN git clone --depth 1 https://github.com/MISP/cti-python-stix2.git; \
|
RUN git clone --depth 1 https://github.com/MISP/cti-python-stix2.git; \
|
||||||
cd cti-python-stix2; python3 setup.py bdist_wheel -d /wheels
|
cd cti-python-stix2 || exit; python3 setup.py bdist_wheel -d /wheels
|
||||||
|
|
||||||
# install PyMISP
|
# install PyMISP
|
||||||
RUN git clone --depth 1 https://github.com/MISP/PyMISP.git; \
|
RUN git clone --depth 1 https://github.com/MISP/PyMISP.git; \
|
||||||
cd PyMISP; python3 setup.py bdist_wheel -d /wheels
|
cd PyMISP || exit; python3 setup.py bdist_wheel -d /wheels
|
||||||
|
|
||||||
# install pydeep
|
# install pydeep
|
||||||
RUN git clone --depth 1 https://github.com/coolacid/pydeep.git; \
|
RUN git clone --depth 1 https://github.com/coolacid/pydeep.git; \
|
||||||
cd pydeep; python3 setup.py bdist_wheel -d /wheels
|
cd pydeep || exit; python3 setup.py bdist_wheel -d /wheels
|
||||||
|
|
||||||
FROM debian:buster-slim
|
FROM debian:buster-slim
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
@ -96,7 +96,7 @@ ARG PHP_VER
|
||||||
# Download MISP using git in the /var/www/ directory.
|
# Download MISP using git in the /var/www/ directory.
|
||||||
RUN git clone --branch v${MISP_TAG} --depth 1 https://github.com/MISP/MISP.git /var/www/MISP; \
|
RUN git clone --branch v${MISP_TAG} --depth 1 https://github.com/MISP/MISP.git /var/www/MISP; \
|
||||||
# We build the MISP modules outside, so we don't need to grab those submodules
|
# We build the MISP modules outside, so we don't need to grab those submodules
|
||||||
cd /var/www/MISP/app; git submodule update --init --recursive .;
|
cd /var/www/MISP/app || exit; git submodule update --init --recursive .;
|
||||||
|
|
||||||
# Python Modules
|
# Python Modules
|
||||||
COPY --from=python-build /wheels /wheels
|
COPY --from=python-build /wheels /wheels
|
||||||
|
|
|
@ -39,7 +39,7 @@ init_misp_config(){
|
||||||
sed -i "s/db\s*password/$MYSQL_PASSWORD/" $MISP_APP_CONFIG_PATH/database.php
|
sed -i "s/db\s*password/$MYSQL_PASSWORD/" $MISP_APP_CONFIG_PATH/database.php
|
||||||
|
|
||||||
echo "Configure sane defaults"
|
echo "Configure sane defaults"
|
||||||
/var/www/MISP/app/Console/cake Admin setSetting "MISP.baseurl" $HOSTNAME
|
/var/www/MISP/app/Console/cake Admin setSetting "MISP.baseurl" "$HOSTNAME"
|
||||||
/var/www/MISP/app/Console/cake Admin setSetting "MISP.python_bin" $(which python3)
|
/var/www/MISP/app/Console/cake Admin setSetting "MISP.python_bin" $(which python3)
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ init_mysql(){
|
||||||
until [ $(isDBup) -eq 0 ] || [ $RETRY -le 0 ] ; do
|
until [ $(isDBup) -eq 0 ] || [ $RETRY -le 0 ] ; do
|
||||||
echo "Waiting for database to come up"
|
echo "Waiting for database to come up"
|
||||||
sleep 5
|
sleep 5
|
||||||
RETRY=$(( $RETRY - 1))
|
RETRY=$(( RETRY - 1))
|
||||||
done
|
done
|
||||||
if [ $RETRY -le 0 ]; then
|
if [ $RETRY -le 0 ]; then
|
||||||
>&2 echo "Error: Could not connect to Database on $MYSQL_HOST:$MYSQL_PORT"
|
>&2 echo "Error: Could not connect to Database on $MYSQL_HOST:$MYSQL_PORT"
|
||||||
|
|
|
@ -4,12 +4,10 @@ set -e
|
||||||
NC='\033[0m' # No Color
|
NC='\033[0m' # No Color
|
||||||
Light_Green='\033[1;32m'
|
Light_Green='\033[1;32m'
|
||||||
echo (){
|
echo (){
|
||||||
command echo -e $1
|
command echo -e "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
STARTMSG="${Light_Green}[ENTRYPOINT_WORKERS]${NC}"
|
STARTMSG="${Light_Green}[ENTRYPOINT_WORKERS]${NC}"
|
||||||
CAKE_CMD="/var/www/MISP/app/Console/cake CakeResque.CakeResque"
|
|
||||||
|
|
||||||
|
|
||||||
# Wait until entrypoint apache is ready
|
# Wait until entrypoint apache is ready
|
||||||
while (true)
|
while (true)
|
||||||
|
|
Loading…
Reference in New Issue