forked from googleads/google-ads-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
25 lines (17 loc) · 1.04 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
FROM php:7.1-apache
ARG USE_C_PROTOBUF=true
RUN apt-get update && apt-get install -y libxml2 zlib1g-dev git unzip
# Install PHP extension(s) required for development.
RUN docker-php-ext-install bcmath
# Install and configure Composer.
RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
# Install and configure the gRPC extension.
RUN pecl install grpc
RUN echo 'extension=grpc.so' >> $PHP_INI_DIR/conf.d/grpc.ini
# Install and configure the C implementation of Protobuf extension if needed.
RUN if [ "$USE_C_PROTOBUF" = "false" ]; then echo 'Using PHP implementation of Protobuf'; else echo 'Using C implementation of Protobuf'; pecl install protobuf; echo 'extension=protobuf.so' >> $PHP_INI_DIR/conf.d/protobuf.ini; fi
# Create empty credentials to make sure the unit tests run successfully.
RUN echo '{"type": "authorized_user","client_id": "","client_secret": "","refresh_token": ""}' >> /root/emptycredentials.json
ENV GOOGLE_APPLICATION_CREDENTIALS /root/emptycredentials.json
WORKDIR "/google-ads-php"