php.Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. FROM --platform=$TARGETPLATFORM phpswoole/swoole:php8.0
  2. # Installation dependencies and PHP core extensions
  3. RUN apt-get update \
  4. && apt-get -y install --no-install-recommends --assume-yes \
  5. libpng-dev \
  6. libzip-dev \
  7. libzip4 \
  8. zip \
  9. unzip \
  10. git \
  11. net-tools \
  12. iputils-ping \
  13. vim \
  14. supervisor \
  15. sudo \
  16. curl \
  17. dirmngr \
  18. apt-transport-https \
  19. lsb-release \
  20. ca-certificates \
  21. libjpeg-dev \
  22. libfreetype6-dev \
  23. inotify-tools
  24. RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - \
  25. && apt-get -y install nodejs
  26. RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
  27. && docker-php-ext-install pdo_mysql gd pcntl zip
  28. RUN mkdir -p /usr/src/php/ext/redis \
  29. && curl -L https://github.com/phpredis/phpredis/archive/5.3.2.tar.gz | tar xvz -C /usr/src/php/ext/redis --strip 1 \
  30. && echo 'redis' >> /usr/src/php-available-exts \
  31. && docker-php-ext-install redis
  32. RUN rm -r /var/lib/apt/lists/*
  33. WORKDIR /var/www
  34. # docker buildx build --no-cache --platform linux/arm64,linux/amd64 -t kuaifan/wookteam:8.0 --push -f ./php.Dockerfile .