forked from composer/satis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (32 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM composer:1 AS build
WORKDIR /satis
COPY . /satis/
RUN composer install \
--no-interaction \
--no-ansi \
--no-scripts \
--no-plugins \
--no-dev \
--prefer-dist \
--no-progress \
--no-suggest \
--classmap-authoritative
FROM php:7-cli-alpine
MAINTAINER https://github.com/composer/satis
RUN apk --no-cache add curl git subversion mercurial openssh openssl tini \
&& apk add --update --no-cache --virtual .build-deps zlib-dev \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
&& runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --virtual .phpext-rundeps $runDeps \
&& apk del .build-deps
ENV COMPOSER_HOME /composer
COPY php-cli.ini /usr/local/etc/php/
COPY --from=build /satis /satis/
WORKDIR /satis
ENTRYPOINT ["/sbin/tini", "-g", "--", "/satis/bin/docker-entrypoint.sh"]
CMD ["--ansi", "-vvv", "build", "/build/satis.json", "/build/output"]