1
0
Fork 0

added multistage dockerfile for installing composer dependencies into container

pull/694/head
jakobblume 2018-12-12 05:48:00 +01:00
parent 1705583e32
commit 8c967924e4
1 changed files with 6 additions and 2 deletions

View File

@ -1,17 +1,21 @@
FROM composer AS builder
COPY ./ /app
RUN composer install
# Running this container will start a language server that listens for TCP connections on port 2088 # Running this container will start a language server that listens for TCP connections on port 2088
# Every connection will be run in a forked child process # Every connection will be run in a forked child process
# Please note that before building the image, you have to install dependencies with `composer install` # Please note that before building the image, you have to install dependencies with `composer install`
FROM php:7-cli FROM php:7-cli
MAINTAINER Felix Becker <felix.b@outlook.com>
RUN docker-php-ext-configure pcntl --enable-pcntl RUN docker-php-ext-configure pcntl --enable-pcntl
RUN docker-php-ext-install pcntl RUN docker-php-ext-install pcntl
COPY ./php.ini /usr/local/etc/php/conf.d/ COPY ./php.ini /usr/local/etc/php/conf.d/
COPY ./ /srv/phpls COPY --from=builder /app /srv/phpls
WORKDIR /srv/phpls WORKDIR /srv/phpls