File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM php:8.4.16-cli-alpine
2+ ARG S6_OVERLAY_VERSION=3.2.1.0
23
34LABEL Maintainer="ShaoBo Wan (Tinywan) <756684177@qq.com>" \
4- Description="Webman Lightweight container with PHP 8.4.16 based on Alpine Linux."
5+ Description="Webman Lightweight container with PHP 8.4.16 based on Alpine Linux with S6 Overlay ."
56
67# Use Alibaba Cloud mirror for faster downloads
78RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories
@@ -34,8 +35,16 @@ COPY config/php.ini /usr/local/etc/php/conf.d/zzz_custom.ini
3435# Setup document root
3536RUN mkdir -p /app
3637
38+ # Use S6 Overlay as init system with environment to override services
39+ VOLUME /app
3740WORKDIR /app
3841EXPOSE 8787
3942
40- # Start webman directly
41- CMD ["php" , "start.php" , "start" ]
43+ CMD ["php" , "start.php" ,"start" ]
44+
45+ # Install S6 Overlay v3
46+ ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
47+ RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
48+ ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
49+ RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
50+ ENTRYPOINT ["/init" ]
You can’t perform that action at this time.
0 commit comments