forked from composer/satis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (48 loc) · 1.22 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM composer:1 AS build
WORKDIR /satis
COPY . /satis/
RUN set -eux; \
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 set -eux; \
apk add --no-cache --upgrade \
bash \
curl \
git \
subversion \
mercurial \
openssh \
openssl \
zip \
unzip; \
apk add --no-cache --virtual .build-deps \
zlib-dev \
libzip-dev; \
docker-php-ext-configure \
zip --with-libzip; \
docker-php-ext-install -j "$(nproc)" \
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 /build
ENTRYPOINT ["/satis/bin/docker-entrypoint.sh"]
CMD ["--ansi", "-vvv", "build", "/build/satis.json", "/build/output"]