Skip to content

Commit f865a6f

Browse files
Tinywanclaude
andcommitted
简化镜像:移除进程管理器,直接启动 webman
对于单一应用容器,不需要进程管理器 - 移除 S6 Overlay 和 supervisord 依赖 - 直接使用 CMD 启动 webman - 镜像大小从 332MB 减少到 311MB(-21MB) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d0a1044 commit f865a6f

2 files changed

Lines changed: 3 additions & 23 deletions

File tree

Dockerfile

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
FROM php:8.4.16-cli-alpine
22

33
LABEL Maintainer="ShaoBo Wan (Tinywan) <756684177@qq.com>" \
4-
Description="Webman Lightweight container with PHP 8.4.16 based on Alpine Linux with S6 Overlay."
4+
Description="Webman Lightweight container with PHP 8.4.16 based on Alpine Linux."
55

66
# Use Alibaba Cloud mirror for faster downloads
77
RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories
88

9-
# Install S6 Overlay v3
10-
ADD https://github.com/just-containers/s6-overlay/releases/download/v3.2.0.0/s6-overlay-noarch.tar.xz /tmp
11-
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && rm /tmp/s6-overlay-noarch.tar.xz
12-
ADD https://github.com/just-containers/s6-overlay/releases/download/v3.2.0.0/s6-overlay-x86_64.tar.xz /tmp
13-
RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz && rm /tmp/s6-overlay-x86_64.tar.xz
14-
159
# Install runtime dependencies only (build deps will be installed and removed later)
1610
RUN apk add --no-cache curl ca-certificates tzdata
1711

@@ -37,20 +31,11 @@ RUN curl -sS https://getcomposer.org/installer | php \
3731
# Configure PHP
3832
COPY config/php.ini /usr/local/etc/php/conf.d/zzz_custom.ini
3933

40-
# Setup S6 Overlay services
41-
COPY config/s6/ /etc/s6-overlay/
42-
43-
# Make scripts executable
44-
RUN chmod +x /etc/s6-overlay/cont-init.d/* \
45-
&& chmod +x /etc/s6-overlay/services/*/run 2>/dev/null || true
46-
4734
# Setup document root
4835
RUN mkdir -p /app
4936

50-
# Set S6 Overlay as entrypoint
51-
ENTRYPOINT ["/init"]
52-
VOLUME /app
5337
WORKDIR /app
5438
EXPOSE 8787
5539

56-
CMD []
40+
# Start webman directly
41+
CMD ["php", "start.php", "start"]

config/s6/services/webman/run

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)