Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
never615 committed May 22, 2024
1 parent 8c103d7 commit 231bcc5
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,54 @@ jobs:
sbom: false
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.PROJECT_NAME }}:arm64-5.1.2-php8.2
build-amd64-512-php83-image:
runs-on: ubuntu-latest
env:
TZ: Asia/Shanghai
steps:
- uses: actions/checkout@v3
- name: Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build && Push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
file: ./Dockerfile_5.1.2_php8.3
push: true
provenance: false
sbom: false
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.PROJECT_NAME }}:amd64-5.1.2-php8.3
build-arm64-512-php83-image:
runs-on: ubuntu-latest
env:
TZ: Asia/Shanghai
steps:
- uses: actions/checkout@v3
- name: Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build && Push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64
file: ./Dockerfile_5.1.2_php8.3
push: true
provenance: false
sbom: false
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.PROJECT_NAME }}:arm64-5.1.2-php8.3
combine-two-images:
runs-on: ubuntu-latest
needs:
Expand Down
67 changes: 67 additions & 0 deletions Dockerfile_5.1.2_php8.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# 使用 PHP 官方镜像作为基础
FROM phpswoole/swoole:5.1.2-php8.3


# 设置非交互式前端以避免交互式配置
ENV DEBIAN_FRONTEND=noninteractive


RUN apt-get update && apt-get install -y \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& rm -r /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd

RUN apt-get update \
&& apt-get install -y \
libc-client-dev \
libkrb5-dev \
&& rm -r /var/lib/apt/lists/* \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap

RUN apt-get update \
&& apt-get install -y \
libgmp-dev \
&& rm -r /var/lib/apt/lists/* \
&& docker-php-ext-install gmp

RUN apt-get update \
&& apt-get install -y \
zip \
libzip-dev \
&& rm -r /var/lib/apt/lists/* \
&& docker-php-ext-install zip

RUN apt-get update \
&& apt-get install -y \
libxml2-dev \
&& rm -r /var/lib/apt/lists/* \
&& docker-php-ext-install soap

#RUN apt-get update \
# && apt-get install -y \
# libmagickwand-dev \
# && rm -r /var/lib/apt/lists/* \
# && echo | pecl install imagick \
# && docker-php-ext-enable imagick


RUN docker-php-ext-install pdo pdo_pgsql pgsql bcmath intl

RUN pecl install msgpack \
&& pecl install igbinary \
&& pecl install pcov \
&& echo | pecl install mongodb \
&& docker-php-ext-enable msgpack igbinary pcov mongodb

# 配置并启用 PCNTL 扩展
RUN docker-php-ext-configure pcntl --enable-pcntl \
&& docker-php-ext-install pcntl

COPY ./php.ini $PHP_INI_DIR/conf.d/docker-vars.ini

# 定义容器启动时执行的命令
CMD ["php", "--version"]

0 comments on commit 231bcc5

Please sign in to comment.