Skip to content

Commit 6dcbbf4

Browse files
committed
Refactor Docker file layouts
1 parent f7a651f commit 6dcbbf4

File tree

2 files changed

+19
-23
lines changed

2 files changed

+19
-23
lines changed

Docker/dev/ubuntu-16.04/Dockerfile

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ RUN mkdir compiler && \
44
apt-get update && \
55
apt-get -y install git build-essential gdb llvm-4.0-dev clang-4.0 unzip curl libcurl4-openssl-dev autoconf libssl-dev libgd-dev libzip-dev bison re2c libxml2-dev libsqlite3-dev libonig-dev vim clang
66

7-
87
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
98
apt-get -y install nodejs
109

@@ -17,23 +16,19 @@ RUN ./buildconf && \
1716
make -j16 && \
1817
make install
1918

20-
WORKDIR ../
21-
22-
RUN curl --silent --show-error https://getcomposer.org/installer | php
23-
RUN mv composer.phar /usr/local/bin/composer
24-
25-
ENV PHP="/usr/local/bin/php", PHP_7_4="/usr/local/bin/php", PHP_CS_FIXER_IGNORE_ENV="true"
26-
27-
COPY php.ini /usr/local/lib/php.ini
28-
29-
WORKDIR php-ast
30-
19+
WORKDIR ../php-ast
3120
RUN git clone https://github.com/nikic/php-ast . && \
3221
phpize && \
3322
./configure && \
3423
make && \
3524
make install
3625

26+
COPY php.ini /usr/local/lib/php.ini
27+
28+
RUN curl --silent --show-error https://getcomposer.org/installer | php -- --no-ansi --install-dir=/usr/local/bin --filename=composer
29+
3730
WORKDIR ../compiler
3831

32+
ENV PHP="/usr/local/bin/php", PHP_7_4="/usr/local/bin/php", PHP_CS_FIXER_IGNORE_ENV="true", COMPOSER_ALLOW_SUPERUSER="1"
33+
3934
CMD ["/bin/bash"]

Docker/dev/ubuntu-18.04/Dockerfile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ RUN mkdir compiler && \
44
apt-get update && \
55
apt-get -y install git build-essential gdb llvm-4.0-dev clang-4.0 unzip curl libcurl4-openssl-dev autoconf libssl-dev libgd-dev libzip-dev bison re2c libxml2-dev libsqlite3-dev libonig-dev vim clang nodejs
66

7+
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
8+
apt-get -y install nodejs
9+
710
RUN curl -L https://github.com/php/php-src/archive/PHP-7.4.zip -o PHP-7.4.zip && unzip PHP-7.4.zip && mv php-src-PHP-7.4 php
811

912
WORKDIR php
@@ -13,21 +16,19 @@ RUN ./buildconf && \
1316
make -j16 && \
1417
make install
1518

16-
WORKDIR ../
17-
18-
RUN curl --silent --show-error https://getcomposer.org/installer | php
19-
20-
ENV PHP="/usr/local/bin/php", PHP_7_4="/usr/local/bin/php", PHP_CS_FIXER_IGNORE_ENV="true"
19+
WORKDIR ../php-ast
20+
RUN git clone https://github.com/nikic/php-ast . && \
21+
phpize && \
22+
./configure && \
23+
make && \
24+
make install
2125

2226
COPY php.ini /usr/local/lib/php.ini
2327

24-
WORKDIR php-ast
25-
RUN git clone https://github.com/nikic/php-ast .
26-
RUN phpize
27-
RUN ./configure
28-
RUN make
29-
RUN make install
28+
RUN curl --silent --show-error https://getcomposer.org/installer | php -- --no-ansi --install-dir=/usr/local/bin --filename=composer
3029

3130
WORKDIR ../compiler
3231

32+
ENV PHP="/usr/local/bin/php", PHP_7_4="/usr/local/bin/php", PHP_CS_FIXER_IGNORE_ENV="true", COMPOSER_ALLOW_SUPERUSER="1"
33+
3334
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)