app.dockerfile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. FROM php:8.2-fpm
  2. # Update packages
  3. RUN apt-get update
  4. # Install PHP and composer dependencies
  5. RUN apt-get install -qq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev
  6. # Clear out the local repository of retrieved package files
  7. # RUN apt-get clean
  8. # Install needed extensions
  9. # Here you can install any other extension that you need during the test and deployment process
  10. RUN apt-get clean; docker-php-ext-install pdo pdo_mysql mcrypt zip gd pcntl opcache bcmath
  11. # Installs Composer to easily manage your PHP dependencies.
  12. RUN curl –silent –show-error https://getcomposer.org/installer | php — –install-dir=/usr/local/bin –filename=composer
  13. # Install Node
  14. RUN apt-get update &&\
  15. apt-get install -y –no-install-recommends gnupg &&\
  16. curl -sL https://deb.nodesource.com/setup_10.x | bash – &&\
  17. apt-get update &&\
  18. apt-get install -y –no-install-recommends nodejs &&\
  19. npm config set registry https://registry.npm.taobao.org –global &&\
  20. npm install –global gulp-cli
  21. CMD php-fpmNotes:
  22. web:
  23. build:
  24. context: ./
  25. dockerfile: web.dockerfile
  26. working_dir: /var/www
  27. volumes_from:
  28. – app
  29. ports:
  30. – 8080:80Notes: