m1k1o / blog

Lightweight self-hosted facebook-styled PHP blog.
https://blog.m1k1o.net
GNU General Public License v3.0
301 stars 31 forks source link

Raspberry Pi #43

Closed merlin699 closed 1 year ago

merlin699 commented 1 year ago

This blogging system would be perfect for hosting on a Raspberry Pi (4). I tried it, but doesn't work.

m1k1o commented 1 year ago

You would need to use arm64v8 PHP, e.g. https://hub.docker.com/r/arm64v8/php/

This should work, can you try?

FROM arm64v8/php:7.4-apache

RUN set -eux; apt-get update; \
    apt-get install -y --no-install-recommends libpq-dev \
    #
    # install curl
    libcurl4-openssl-dev \
    #
    # install gd dependencies
    zlib1g-dev libpng-dev libjpeg-dev \
    libwebp-dev libxpm-dev libfreetype6-dev; \
    #
    # clean up
    rm -rf /var/lib/apt/lists/*; \
    #
    # configure extensions
    docker-php-ext-configure gd --enable-gd \
    --with-jpeg --with-webp --with-xpm --with-freetype; \
    #
    # install extensions
    docker-php-ext-install curl gd pdo pdo_mysql pdo_pgsql exif; \
    #
    # set up environment
    a2enmod rewrite;

#
# copy files
COPY --chown=33:33 . /var/www/html

VOLUME /var/www/html/data
merlin699 commented 1 year ago

Sorry, but where should I run this? I'm using portainer.

m1k1o commented 1 year ago

I added multiarch builds. Please try to pull newest image and try again.

merlin699 commented 1 year ago

You are a hero, thank for your great service. Running my blog from a RPI4 now :)