1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 09:54:17 +02:00

use parser binary

This commit is contained in:
Robin Appelman 2019-03-05 23:04:30 +01:00
commit 334dfb3771
6 changed files with 25 additions and 35 deletions

View file

@ -1,16 +1,17 @@
FROM php:7.1-fpm-alpine
FROM registry.gitlab.com/rust_musl_docker/image:stable-latest AS build
WORKDIR /root/build
RUN git clone https://github.com/demostf/parser
WORKDIR /root/build/parser
RUN cargo build --release --target=x86_64-unknown-linux-musl
RUN apk add --no-cache postgresql-dev wget autoconf g++ libc-dev make pcre-dev \
&& mkdir -p /app/src \
&& docker-php-ext-install pdo_pgsql \
&& pecl install apcu \
&& docker-php-ext-enable apcu \
&& apk del autoconf g++ libc-dev make pcre-dev \
&& sed -i -- 's/www-data/nobody/g' /usr/local/etc/php-fpm.d/www.conf
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