Any ideas what changes might be required for arm. The main issue seems to be finding a compatible arm32v7/6 alpine php image.
Good question. I'm no Docker expert, but according to docker-library it should just auto-build for your current architecture:
As of 2017-09-12, these other architectures are included under the non-prefixed images via "manifest lists" (also known as "indexes" in the OCI image specification), such that, for example,
docker run hello-worldshould run as-is on all supported platforms.
The current docker image is based on ulsmith/alpine-apache-php7. If you take a look into its docker file, it is based on alpine:edge, which according to their readme supports amd64, arm32v6, arm64v8, i386, ppc64le, s390x.
Hmm no it definitely doesn’t pull an arm image.
For other things, especially self written python services that I’ve converted to docker, I’ve used a dockerfile with replacing architecture strings and a build script to build for amd64, arm32v7 and arm64. Then push manifests.
With rss-bridge I was stuck looking for the alpine php for arm to use as the base
Hmm no it definitely doesn’t pull an arm image.
:(
For other things, especially self written python services that I’ve converted to docker, I’ve used a dockerfile with replacing architecture strings and a build script to build for amd64, arm32v7 and arm64. Then push manifests.
Took me a while to understand what you mean, but I think it's clear(er) to me now. According to my research (please correct me if I'm wrong), we need to build each architecture separately (i.e. rss-bridge:amd64-latest, rss-bridge:arm32v7-latest, etc...). Using some sort of script we can automate this process somehow (pointers please).
I'm pretty sure that ulsmith/alpine-apache-php7 doesn't support multi-arch, so maybe we need to build our own packages based on the various flavors of alpine?
i.e.
This might also be interesting: https://lobradov.github.io/Building-docker-multiarch-images/
I'm open to suggestions :grin:
Yeah that building multiarch link I’ve had to read backwards and forwards
to figure out some of this. I believe your understanding is correct.
So where I’m at is working out the alpine base image I can use for arm so
that I can write the docker file for arm.
On Fri, 26 Oct 2018 at 06:11, LogMANOriginal notifications@github.com
wrote:
Hmm no it definitely doesn’t pull an arm image.
:(
For other things, especially self written python services that I’ve
converted to docker, I’ve used a dockerfile with replacing architecture
strings and a build script to build for amd64, arm32v7 and arm64. Then push
manifests.Took me a while to understand what you mean, but I think it's clear(er) to
me now. According to my research (please correct me if I'm wrong), we need
to build each architecture separately (i.e. rss-bridge:amd64-latest,
rss-bridge:arm32v7-latest, etc...). Using some sort of script we can
automate this process somehow (pointers please).I'm pretty sure that ulsmith/alpine-apache-php7 doesn't support multi-arch
https://hub.docker.com/r/ulsmith/alpine-apache-php7/, so maybe we need
to build our own packages based on the various flavors of alpine?i.e.
- https://hub.docker.com/r/amd64/alpine/
- https://hub.docker.com/r/arm32v6/alpine/
- https://hub.docker.com/r/arm64v8/alpine/
This might also be interesting:
https://lobradov.github.io/Building-docker-multiarch-images/I'm open to suggestions 😁
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/RSS-Bridge/rss-bridge/issues/883#issuecomment-433132403,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFGkc7-c2ZfS7M7-o7n9aFX9anyKKs87ks5uofDNgaJpZM4X2eb6
.
Is this still an issue?
The Dockerfile was recently updated to the official PHP image which has support for various flavors of arm: https://hub.docker.com/_/php
Not sure. I've been running on amd64 since I could never get it going on arm.....even though that's where my tt-rss is on arm.
I could give it another go with the later docker file and see if I can get an arm build working.
Looks like Docker Hub only builds amd64 images. Here is my attempt. Here is a post I found on the Docker forums that explains the error message: https://forums.docker.com/t/automated-build-raspberry-pi-based-image-on-docker-hub/4155/2
You should be able to build the docker image directly on your machine.
Change the first line in the Dockerfile. https://github.com/RSS-Bridge/rss-bridge/blob/7ff97c0c7b60d8273f241c851decd2dd1e8e860b/Dockerfile#L1
to FROM arm32v7/php:7-apache and build the image.
Looks like Docker Hub only builds
amd64images. Here is my attempt. Here is a post I found on the Docker forums that explains the error message: https://forums.docker.com/t/automated-build-raspberry-pi-based-image-on-docker-hub/4155/2You should be able to build the docker image directly on your machine.
Change the first line in the Dockerfile.https://github.com/RSS-Bridge/rss-bridge/blob/7ff97c0c7b60d8273f241c851decd2dd1e8e860b/Dockerfile#L1
to
FROM arm32v7/php:7-apacheand build the image.
It's working, just created a docker image for Raspberry Pi3.
@jdckr Thanks for the bump. I somehow never noticed this issue.
One of my goals while setting up the initial dockerfile was to ensure public auditable builds. There seem to be some workarounds for getting arm to work on DockerHub via build hooks so I'll take a stab at this later.
Has there been an update on this issue since I still can't run this on my Raspberry Pi that uses ARMv7.
@tobinstultiens Have you tried to build the image on your pi?
Yeah, it gives me this error.
standard_init_linux.go:211: exec user process caused "exec format error"
So when I have some time next week I will attempt to fix the dockerfile myself if there has been no progress.
Have you updated the dockerfile? You need to change the base image to FROM arm32v7/php:7-apache?
does anyone have a docker-compose to share? I really want to run this on my pi4
You just need to change the FROM in the dockerfile.
This is the dockerfile you want:
FROM arm32v7/php:7-apache
ENV APACHE_DOCUMENT_ROOT=/app
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& apt-get --yes update && apt-get --yes install libxml2-dev zlib1g-dev libmemcached-dev \
&& docker-php-ext-install -j$(nproc) simplexml \
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \
&& sed -ri -e 's/(MinProtocol\s*=\s*)TLSv1\.2/\1None/' /etc/ssl/openssl.cnf \
&& sed -ri -e 's/(CipherString\s*=\s*DEFAULT)@SECLEVEL=2/\1/' /etc/ssl/openssl.cnf
RUN curl https://codeload.github.com/php-memcached-dev/php-memcached/tar.gz/v3.1.5 --output /tmp/php-memcached.tar.gz \
&& mkdir -p /usr/src/php/ext \
&& tar xzvf /tmp/php-memcached.tar.gz -C /usr/src/php/ext \
&& mv /usr/src/php/ext/php-memcached-3.1.5 /usr/src/php/ext/memcached \
&& cd /usr/src/php/ext/memcached \
&& docker-php-ext-configure /usr/src/php/ext/memcached --disable-memcached-sasl \
&& docker-php-ext-install /usr/src/php/ext/memcached \
&& rm -rf /usr/src/php/ext/memcached
COPY --chown=www-data:www-data ./ /app/
I have personally tested this and it works. I don't know how to make it switchable on the basis of your operating system.
So I am still pretty new to this but would it look something like this then?
version: '2'
services:
rss-bridge:rssbridge/rss-bridge
image: rssbridge/rss-bridge:latest
volumes:
- /opt/appdata/rss-bridge/whitelist.txt:/app/whitelist.txt
ports:
- 4050:80
depends_on:
- db
db:
image: arm32v7/php:7-apache
restart: always
environment:
- APACHE_DOCUMENT_ROOT=/app
onrun:
- mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& apt-get --yes update && apt-get --yes install libxml2-dev zlib1g-dev libmemcached-dev \
&& docker-php-ext-install -j$(nproc) simplexml \
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \
&& sed -ri -e 's/(MinProtocol\s*=\s*)TLSv1\.2/\1None/' /etc/ssl/openssl.cnf \
&& sed -ri -e 's/(CipherString\s*=\s*DEFAULT)@SECLEVEL=2/\1/' /etc/ssl/openssl.cnf
- curl https://codeload.github.com/php-memcached-dev/php-memcached/tar.gz/v3.1.5 --output /tmp/php-memcached.tar.gz \
&& mkdir -p /usr/src/php/ext \
&& tar xzvf /tmp/php-memcached.tar.gz -C /usr/src/php/ext \
&& mv /usr/src/php/ext/php-memcached-3.1.5 /usr/src/php/ext/memcached \
&& cd /usr/src/php/ext/memcached \
&& docker-php-ext-configure /usr/src/php/ext/memcached --disable-memcached-sasl \
&& docker-php-ext-install /usr/src/php/ext/memcached \
&& rm -rf /usr/src/php/ext/memcached
- cp --chown=www-data:www-data ./ /app/
@rastacalavera
You have to adapt the Dockerfile and built the image for the pi4 on your own.
FROM php:7-apache -> FROM arm32v7/php:7-apache https://github.com/RSS-Bridge/rss-bridge/blob/7ff97c0c7b60d8273f241c851decd2dd1e8e860b/Dockerfile#L1 sudo docker build -t <name>:<tag> <path/to/repo> e.g. sudo docker build -t rss-bridge:local .version: '3'
services:
rss-bridge:
container_name: rss-bridge
volumes:
- ./whitelist.txt:/app/whitelist.txt
image: <image_name> # e.g. rss-bridge:local from command above
ports:
- <host_port>:80
restart: unless-stopped
@jdckr thanks! I am up and running now
Ok spoke too soon. It's running but there aren't any bridges listed. . . in the path there is a FOLDER that was made called whitelist.txt which was empty but the only txt file was called whitelist.default.txt so I actually don't have access to any bridges. Weird. . .
Most helpful comment
@rastacalavera
You have to adapt the Dockerfile and built the image for the pi4 on your own.
FROM php:7-apache->FROM arm32v7/php:7-apachehttps://github.com/RSS-Bridge/rss-bridge/blob/7ff97c0c7b60d8273f241c851decd2dd1e8e860b/Dockerfile#L1sudo docker build -t <name>:<tag> <path/to/repo>e.g.sudo docker build -t rss-bridge:local .