1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 09:54:17 +02:00
api/Dockerfile
Robin Appelman ff3bd402ce update parser
fixes handling of demo files with malformed utf8
2019-05-25 23:59:02 +02:00

23 lines
914 B
Docker

FROM registry.gitlab.com/rust_musl_docker/image:stable-latest AS build
ENV PARSER_VERSION d12cf35e47ccf7feb4ada27704f9542eee163efe
WORKDIR /root/build
RUN git clone https://github.com/demostf/parser
WORKDIR /root/build/parser
RUN git checkout $PARSER_VERSION
RUN cargo build --release --target=x86_64-unknown-linux-musl
FROM icewind1991/php-alpine-apcu
COPY --from=build /root/build/parser/target/x86_64-unknown-linux-musl/release/parse_demo /app/parse_demo
COPY composer.json /app
COPY src /app/src
ENV PARSER_PATH /app/parse_demo
RUN wget https://getcomposer.org/composer.phar \
&& php composer.phar --working-dir=/app install --no-dev --no-interaction --ignore-platform-reqs \
&& rm composer.phar
RUN echo "clear_env = no" >> /usr/local/etc/php/php-fpm.conf \
&& echo "post_max_size = 150M" >> /usr/local/etc/php/php.ini \
&& echo "upload_max_filesize = 150M" >> /usr/local/etc/php/php.ini