diff --git a/server/Dockerfile b/server/Dockerfile index 96aee95..3c14488 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -2,6 +2,7 @@ ARG DOCKER_HUB_PROXY="" FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as composer-build ENV DEBIAN_FRONTEND noninteractive + ENV COMPOSER_ALLOW_SUPERUSER 1 ARG MISP_TAG ARG MISP_COMMIT RUN apt-get update; apt-get install -y --no-install-recommends \ @@ -22,16 +23,18 @@ FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as composer-build WORKDIR /tmp ADD https://raw.githubusercontent.com/MISP/MISP/${MISP_COMMIT:-${MISP_TAG}}/app/composer.json /tmp - COPY --from=composer:2.1.14 /usr/bin/composer /usr/bin/composer + COPY --from=composer:latest /usr/bin/composer /usr/bin/composer + RUN composer config --no-interaction allow-plugins.composer/installers true RUN composer install RUN composer require --with-all-dependencies \ supervisorphp/supervisor:^4.0 \ guzzlehttp/guzzle \ - php-http/message \ - php-http/message-factory \ lstrojny/fxmlrpc \ + php-http/message \ + php-http/message-factory + RUN composer require --with-all-dependencies \ elasticsearch/elasticsearch:^8.7.0 \ - jakub-onderka/openid-connect-php:1.0.0-rc1 \ + jakub-onderka/openid-connect-php:^1.0.0 \ aws/aws-sdk-php FROM "${DOCKER_HUB_PROXY}debian:bullseye-slim" as php-build diff --git a/server/files/configure_misp.sh b/server/files/configure_misp.sh index a23e13e..7d9c901 100755 --- a/server/files/configure_misp.sh +++ b/server/files/configure_misp.sh @@ -93,6 +93,7 @@ apply_updates() { init_user() { # Create the main user if it is not there already sudo -u www-data /var/www/MISP/app/Console/cake userInit -q 2>&1 > /dev/null + echo "... setting admin email to '${ADMIN_EMAIL}'" sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "MISP.email" ${ADMIN_EMAIL} echo "UPDATE misp.users SET email = \"${ADMIN_EMAIL}\" WHERE id = 1;" | ${MYSQLCMD} if [ ! -z "$ADMIN_ORG" ]; then @@ -118,7 +119,7 @@ init_user() { sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Security.password_policy_complexity" ${PASSWORD_POLICY} sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Security.password_policy_length" ${PASSWORD_LENGTH} else - echo "... setting adming password skipped" + echo "... setting admin password skipped" fi echo 'UPDATE misp.users SET change_pw = 0 WHERE id = 1;' | ${MYSQLCMD} }