瀏覽代碼

不编译php了

kphcdr 1 年之前
父節點
當前提交
bc9fd94663
共有 2 個文件被更改,包括 3 次插入55 次删除
  1. 3 7
      docker-compose.yml
  2. 0 48
      service/php/Dockerfile

+ 3 - 7
docker-compose.yml

@@ -21,12 +21,9 @@ services:
       - "${NUMBER}080:80"
 
   php:
-    build:
-     context: ./service/php
-     args:
-       TZ: "Asia/Shanghai"
-    restart: always
     container_name: ${ABBREVIATION}-php-fpm
+    image: likeshop/php:8.0.22-fpm
+    restart: always
     working_dir: /www/server
     volumes:
       - ./www:/www
@@ -36,9 +33,8 @@ services:
 
   mysql:
     container_name: ${ABBREVIATION}-mysql
-    image:  docker.io/mysql:5.7.29 #X86架构
+    image:  mysql:5.7.29 #X86架构
     restart: always
-    platform: linux/amd64  #osx系统才需要
     ports:
       - "${NUMBER}3306:3306"   
     volumes:

+ 0 - 48
service/php/Dockerfile

@@ -1,48 +0,0 @@
-FROM php:8.2-fpm
-
-MAINTAINER xs
-
-ENV TZ="Asia/Shanghai"
-
-RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
-
-# Utils
-RUN apt-get update && \
-    apt-get install -y --no-install-recommends \
-        libssl-dev libaio-dev net-tools dnsutils && \
-    rm -rf /var/lib/apt/lists/*
-
-# Composer
-RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
-    composer self-update --clean-backups && \
-    composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
-
-# Core Libs
-RUN echo "Installing Core Libs..." && \
-    # GD
-    apt-get update && \
-    apt-get install -y --no-install-recommends \
-        libfreetype6-dev libjpeg62-turbo-dev libpng-dev && \
-    rm -rf /var/lib/apt/lists/* && \
-    docker-php-ext-configure gd --with-freetype --with-jpeg && \
-    docker-php-ext-install -j$(nproc) gd && \
-    # bcmath
-    docker-php-ext-install bcmath && \
-    # sockets
-    docker-php-ext-install sockets && \
-    # MySQL extension
-    docker-php-ext-install mysqli pdo_mysql && \
-    # Redis
-    pecl install redis && \
-    docker-php-ext-enable redis && \
-    # ZIP
-    apt-get update && \
-    apt-get install -y --no-install-recommends \
-        libzip-dev && \
-    rm -rf /var/lib/apt/lists/* && \
-    docker-php-ext-install -j$(nproc) zip
-
-# Expose port 9000
-EXPOSE 9000
-
-WORKDIR /