Skip to content

Modernize Dockerfile, use the newest PHP version #21

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

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
12 changes: 6 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.2-cli
FROM php:8.4-cli

RUN apt-get update && apt-get install -y git

Expand All @@ -16,17 +16,17 @@ RUN apt-get install -y libpq-dev \


# == Microsoft SQL Seriver extension == #
RUN apt-get -y --no-install-recommends install unixodbc-dev \
RUN apt-get -y --no-install-recommends install libonig-dev unixodbc-dev \
&& docker-php-ext-install mbstring pdo \
&& pecl install sqlsrv pdo_sqlsrv \
&& docker-php-ext-enable sqlsrv pdo_sqlsrv


RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
RUN php composer-setup.php --install-dir=bin --filename=composer
RUN php -r "unlink('composer-setup.php');"
# Install composer
COPY --from=composer/composer:latest-bin /composer /usr/bin/composer

RUN mkdir /var/www/anonymizer
WORKDIR /var/www/anonymizer
RUN composer require webnet-fr/database-anonymizer:master-dev symfony/console symfony/config symfony/yaml
# Create symlink from expected location to actual location
RUN ln -s /usr/local/bin/php /usr/bin/php