Skip to content

Commit b31befb

Browse files
committed
build: dockerfile support php
1 parent 70dc43b commit b31befb

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Dockerfile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,28 @@ RUN cp /app/.env.development /app/.env && \
4343
# 但是,我们仍然需要安装Node.js运行时本身(除非drpys项目是一个纯静态资源服务,不需要Node.js运行时)
4444
RUN apk add --no-cache nodejs
4545

46+
# 安装php8.3及其扩展
47+
RUN apk add --no-cache \
48+
php83 \
49+
php83-cli \
50+
php83-curl \
51+
php83-mbstring \
52+
php83-xml \
53+
php83-pdo \
54+
php83-pdo_mysql \
55+
php83-pdo_sqlite \
56+
php83-openssl \
57+
php83-sqlite3 \
58+
php83-json
59+
RUN ln -sf /usr/bin/php83 /usr/bin/php
60+
4661
# 安装python3依赖
4762
RUN apk add --no-cache python3 \
4863
py3-pip \
4964
py3-setuptools \
5065
py3-wheel
5166

52-
# 激活python3虚拟环境并安装依pip3赖
67+
# 激活python3虚拟环境并安装requirements依赖
5368
RUN python3 -m venv /app/.venv && \
5469
. /app/.venv/bin/activate && \
5570
pip3 install -r /app/spider/py/base/requirements.txt

0 commit comments

Comments
 (0)