Skip to content

Apache full example dockerfile outdated #2467

Description

@Ageraluon

Hello!
The full apache example offered here in the repo seems outdated.

When trying to build, including the packages

libmagickcore-6.q16-6-extra (line 9)
libc-client-dev (line 24)

throw errors, the packages are not known anymore.

Would you kindly help with updating the example file?
Thank you!

Activity

  1. Ageraluon commented on Sep 3, 2025

    @Ageraluon
    Author

    line 39 also throws an error.

    Hotfix can be to install general imagemagick and install libc-dev from the buster repo and skip cleanup.
    However this is legacy, needs something more durgable.

    Hotfix:

    RUN set -ex; \
        \
        apt-get update; \
        apt-get install -y --no-install-recommends \
            ffmpeg \
    #        libmagickcore-6.q16-3-extra \
            imagemagick \
            procps \
            smbclient \
            supervisor \
    #        libreoffice \
            sudo \
        ; \
        rm -rf /var/lib/apt/lists/*
    
    RUN set -ex; \
        \
        savedAptMark="$(apt-mark showmanual)"; \
        \
        apt-get update; \
        apt-get install -y --no-install-recommends \
            libbz2-dev \
    #Seems to throw error right now
    #        libc-client-dev \
            libkrb5-dev \
            libsmbclient-dev \
        ; 
    
    #workaround: libc-client-dev is installed from buster image
    # Add Buster repository for libc-client-dev only
    RUN echo "deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://archive.debian.org/debian/ buster main" > /etc/apt/sources.list.d/buster.list
    
    # Install libc-client-dev package from Buster repository
    RUN apt-get update && apt-get install -y libc-client-dev
    
    # Clean up the added repository and pin file
    RUN rm /etc/apt/sources.list.d/buster.list && apt-get update;
    
    #continue as in original file
    RUN set -ex; \
        docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
        docker-php-ext-install \
            bz2 \
            imap \
        ; \
        pecl install smbclient; \
        docker-php-ext-enable smbclient; \
        \
    # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
        # apt-mark auto '.*' > /dev/null; \
        # apt-mark manual $savedAptMark; \
        # ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
        #     | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
        #     | sort -u \
        #     | xargs -r dpkg-query --search \
        #     | cut -d: -f1 \
        #     | sort -u \
        #     | xargs -rt apt-mark manual; \
        # \
        # apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
        rm -rf /var/lib/apt/lists/*
    
  2. Eschguy commented on Sep 8, 2025

    @Eschguy

    line 39 also throws an error.

    Hotfix can be to install general imagemagick and install libc-dev from the buster repo and skip cleanup. However this is legacy, needs something more durgable.

    Hotfix:

    RUN set -ex; \
        \
        apt-get update; \
        apt-get install -y --no-install-recommends \
            ffmpeg \
    #        libmagickcore-6.q16-3-extra \
            imagemagick \
            procps \
            smbclient \
            supervisor \
    #        libreoffice \
            sudo \
        ; \
        rm -rf /var/lib/apt/lists/*
    
    RUN set -ex; \
        \
        savedAptMark="$(apt-mark showmanual)"; \
        \
        apt-get update; \
        apt-get install -y --no-install-recommends \
            libbz2-dev \
    #Seems to throw error right now
    #        libc-client-dev \
            libkrb5-dev \
            libsmbclient-dev \
        ; 
    
    #workaround: libc-client-dev is installed from buster image
    # Add Buster repository for libc-client-dev only
    RUN echo "deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://archive.debian.org/debian/ buster main" > /etc/apt/sources.list.d/buster.list
    
    # Install libc-client-dev package from Buster repository
    RUN apt-get update && apt-get install -y libc-client-dev
    
    # Clean up the added repository and pin file
    RUN rm /etc/apt/sources.list.d/buster.list && apt-get update;
    
    #continue as in original file
    RUN set -ex; \
        docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
        docker-php-ext-install \
            bz2 \
            imap \
        ; \
        pecl install smbclient; \
        docker-php-ext-enable smbclient; \
        \
    # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
        # apt-mark auto '.*' > /dev/null; \
        # apt-mark manual $savedAptMark; \
        # ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
        #     | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
        #     | sort -u \
        #     | xargs -r dpkg-query --search \
        #     | cut -d: -f1 \
        #     | sort -u \
        #     | xargs -rt apt-mark manual; \
        # \
        # apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
        rm -rf /var/lib/apt/lists/*
    

    This got me back up and running for now, hopefully they fix it soon.

  3. zhixXiang commented on Sep 10, 2025

    @zhixXiang

    line 39 also throws an error.

    Hotfix can be to install general imagemagick and install libc-dev from the buster repo and skip cleanup. However this is legacy, needs something more durgable.

    Hotfix:

    RUN set -ex; \
        \
        apt-get update; \
        apt-get install -y --no-install-recommends \
            ffmpeg \
    #        libmagickcore-6.q16-3-extra \
            imagemagick \
            procps \
            smbclient \
            supervisor \
    #        libreoffice \
            sudo \
        ; \
        rm -rf /var/lib/apt/lists/*
    
    RUN set -ex; \
        \
        savedAptMark="$(apt-mark showmanual)"; \
        \
        apt-get update; \
        apt-get install -y --no-install-recommends \
            libbz2-dev \
    #Seems to throw error right now
    #        libc-client-dev \
            libkrb5-dev \
            libsmbclient-dev \
        ; 
    
    #workaround: libc-client-dev is installed from buster image
    # Add Buster repository for libc-client-dev only
    RUN echo "deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://archive.debian.org/debian/ buster main" > /etc/apt/sources.list.d/buster.list
    
    # Install libc-client-dev package from Buster repository
    RUN apt-get update && apt-get install -y libc-client-dev
    
    # Clean up the added repository and pin file
    RUN rm /etc/apt/sources.list.d/buster.list && apt-get update;
    
    #continue as in original file
    RUN set -ex; \
        docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
        docker-php-ext-install \
            bz2 \
            imap \
        ; \
        pecl install smbclient; \
        docker-php-ext-enable smbclient; \
        \
    # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
        # apt-mark auto '.*' > /dev/null; \
        # apt-mark manual $savedAptMark; \
        # ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
        #     | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
        #     | sort -u \
        #     | xargs -r dpkg-query --search \
        #     | cut -d: -f1 \
        #     | sort -u \
        #     | xargs -rt apt-mark manual; \
        # \
        # apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
        rm -rf /var/lib/apt/lists/*
    

    Thanks, you saved my day!

  4. rodinux commented on Sep 15, 2025

    @rodinux

    Thanks, it works ! is it possible do a PR ? or a review if needed ?

  5. rodinux commented on Sep 15, 2025

    @rodinux

    Ohhh I haven't seen it needs rollback to buster... then I will wait for a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions