mirror of https://github.com/MISP/misp-docker
Upgrade composer to latest stable
parent
4e7b1a1912
commit
9447c93b29
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue