Update Dockerfile (#1)

- new base for container
- force use of composer v1
- use jikan's source .env and modify it later
pull/2/head
Angel Garcia 5 years ago committed by GitHub
parent ec69cc79a0
commit e0abf02959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,19 +1,23 @@
FROM php:7.3.11-apache-buster FROM php:7.3-apache
ENV COMPOSER_ALLOW_SUPERUSER 1 ENV COMPOSER_ALLOW_SUPERUSER 1
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
openssl \ curl \
git \ git \
unzip \ unzip \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && apt-get clean && rm -rf /var/lib/apt/lists/* \
&& composer --version \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=1.10.16 \
&& a2enmod rewrite \ && composer --version \
&& service apache2 restart \ && a2enmod rewrite \
&& git clone https://github.com/jikan-me/jikan-rest.git . \ && service apache2 restart \
&& composer install --prefer-dist --no-progress --no-suggest --classmap-authoritative --no-interaction \ && git clone https://github.com/jikan-me/jikan-rest.git . \
&& composer update jikan-me/jikan && cp .env.dist .env \
&& sed -i "s/GITHUB_REPORTING=.*/GITHUB_REPORTING=false/" .env \
&& sed -i "s/REDIS_HOST=.*/REDIS_HOST=jikan-redis/" .env \
&& composer install --prefer-dist --no-progress --classmap-authoritative --no-interaction \
&& composer update jikan-me/jikan
ADD .env /run-jikan.sh ./ ADD run-jikan.sh ./
ENTRYPOINT ["./run-jikan.sh"] ENTRYPOINT ["./run-jikan.sh"]

Loading…
Cancel
Save