1
0
This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
dtux__serveur-vote-lalis/include/Condorcet/Dockerfile

35 lines
1.2 KiB
Docker
Raw Normal View History

2022-09-21 12:39:11 +02:00
FROM php:8.1-cli-bullseye
COPY . /usr/src/condorcetapp
WORKDIR /usr/src/condorcetapp
ENV PATH="${PATH}:/usr/src/condorcetapp/bin"
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& sed -i "s/128M/4096M/g" "$PHP_INI_DIR/php.ini" \
&& apt-get update \
&& apt-get install --no-install-recommends --fix-missing -yqq git unzip curl \
&& curl --silent --show-error https://getcomposer.org/installer | php \
&& chmod +x /usr/src/condorcetapp/bin/* \
&& rm -fR composer.lock vendor \
&& php composer.phar install --no-dev --optimize-autoloader --no-progress \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf \
/var/lib/apt/lists/* \
/root/.composer/cache \
/tmp/* \
/var/tmp/* \
/usr/share/man \
/usr/share/doc \
/usr/share/doc-base
# Sf Command completion
RUN php bin/condorcet completion bash | tee /etc/bash_completion.d/console-events-terminate
ENTRYPOINT [ "condorcet" ]
# Usage:
# 1. docker build -t condorcet .
# 2. docker run --hostname="condorcet" --rm -it condorcet:latest
# 3. docker run --hostname="condorcet" --rm -it condorcet:latest election -c "A;B;C" -w "A>B;C>A;B>A" -lr "Schulze"