Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
never615 committed Mar 29, 2024
1 parent e8bdb32 commit 7d67e35
Show file tree
Hide file tree
Showing 2 changed files with 113 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 @@ -77,6 +77,54 @@ jobs:
sbom: false
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.PROJECT_NAME }}:amd64-with-utils
build-amd64-4.8-php8.2-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_with_utils
push: true
provenance: false
sbom: false
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.PROJECT_NAME }}:amd64-4.8-php8.2
build-arm64-4.8-php8.2-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
push: true
provenance: false
sbom: false
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.PROJECT_NAME }}:arm64-4.8-php8.2
combine-two-images:
runs-on: ubuntu-latest
needs:
Expand Down
65 changes: 65 additions & 0 deletions Dockerfile_4.8_php8.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 使用 PHP 官方镜像作为基础
FROM phpswoole/swoole:4.8-php8.2

# 设置非交互式前端以避免交互式配置
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 7d67e35

Please sign in to comment.