Skip to content

Commit

Permalink
Avoiding Docker to cache "git clone" instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
stavarengo committed Feb 6, 2017
1 parent 6bee38a commit c0249dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Empty file added .dockerignore
Empty file.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ FROM stavarengo/cld2-php-language-detection-library:v0.0.3

COPY Docker/language-detection-service.conf /etc/apache2/sites-available/

COPY ./ /var/www/html/language-detection-service

RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install zip unzip -y && \
# Clone our repository
cd /var/www/html && \
git clone https://github.com/stavarengo/language-detection-service.git --progress && \
# Install Composer
# mkdir -p /var/www/html/language-detection-service && \
cd /var/www/html/language-detection-service && \
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "if (hash_file('SHA384', 'composer-setup.php') === '55d6ead61b29c7bdee5cccfb50076874187bd9f21f65d8991d46ec5cc90518f447387fb9f76ebae1fbbacf329e583e30') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');" && \
# Install Composer dependencies
cd /var/www/html/language-detection-service && \
php composer.phar install --no-dev && \
# Enabling our Apache Site and some required Apache Modules
rm -rf /etc/apache2/sites-enabled/* && \
Expand Down

0 comments on commit c0249dc

Please sign in to comment.