Skip to content

php-fpm errors after apt-get upgrade: Address already in use #29

@cpboyd

Description

@cpboyd

Description

After adding apt-get upgrade to the craftcms example (full Dockerfile in "Steps to reproduce"), the following error happens:

web-1  | [27-Dec-2025 05:12:43] ERROR: unable to bind listening socket for address '/var/run/php/php-fpm.sock': Address already in use (98)
web-1  | [27-Dec-2025 05:12:43] ERROR: unable to bind listening socket for address '/var/run/php/php-fpm.sock': Address already in use (98)
web-1  | [27-Dec-2025 05:12:43] ERROR: FPM initialization failed
web-1  | [27-Dec-2025 05:12:43] ERROR: FPM initialization failed
web-1  | 2025-12-27 05:12:43,321 INFO exited: php-fpm (exit status 78; not expected)
web-1  | 2025-12-27 05:12:43,321 INFO exited: php-fpm (exit status 78; not expected)

This error first appeared sometime in the 2 weeks preceding December 16 (kaniko cache defaults to 2 weeks).

Steps to reproduce

ARG php_version
FROM ghcr.io/craftcms/image:${php_version}

USER root

# BREAKING UPDATES:
RUN apt-get update \
    && apt-get upgrade -y \
    && rm -rf /var/lib/apt/lists/*

# copy the files from the host to the container that we need
COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf
COPY etc/supervisord.d/nginx.ini /etc/supervisord.d/nginx.ini

# set the sockets and pid files to be writable by the appuser
RUN mkdir -p /var/log/nginx && chown -R appuser:appgroup /var/log/nginx
RUN chown -R appuser:appgroup /var/lib/nginx && touch /run/nginx.pid && chown -R appuser:appgroup /run/nginx.pid

USER appuser

Additional info

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions