Skip to content

Commit 7303143

Browse files
jkblumefelixfbecker
authored andcommitted
build: run 'composer install' in a docker builder stage (#694)
1 parent 1705583 commit 7303143

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
21
# Running this container will start a language server that listens for TCP connections on port 2088
32
# Every connection will be run in a forked child process
43

5-
# Please note that before building the image, you have to install dependencies with `composer install`
4+
FROM composer AS builder
5+
6+
COPY ./ /app
7+
RUN composer install
68

79
FROM php:7-cli
8-
MAINTAINER Felix Becker <felix.b@outlook.com>
10+
LABEL maintainer="Felix Becker <felix.b@outlook.com>"
911

1012
RUN docker-php-ext-configure pcntl --enable-pcntl
1113
RUN docker-php-ext-install pcntl
1214
COPY ./php.ini /usr/local/etc/php/conf.d/
1315

14-
COPY ./ /srv/phpls
16+
COPY --from=builder /app /srv/phpls
1517

1618
WORKDIR /srv/phpls
1719

0 commit comments

Comments
 (0)