New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permit raspberry pi (and other architectures) builds #985
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
it's strange, bors says 'build succeeded' but it seems like it doesn't report it's status ... |
It does if you click the link in the comment. Bors merely creates branches and merges them, Travis is the one to run the checks. |
This is pretty cool, I have a few comments and questions at this point.
|
Hi, thank you for the review, here are the answers :
|
I don't believe travis-CI has anything else then X86_64. They've closed an issue without fix regarding this travis-ci/travis-ci#3376 |
@muhlemmer actually the problem is not TravisCI: the build for Raspberry Pi can be done from an x86_64 machine, that is why there is some qemu related files. The problem is just that I don't know what to configure where to make it run the command :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an awesome idea! Unfortunately I don't have Pi for testing. However, I've reviewed the code and have left some comments. Basically some house-keeping details.
Besides the comments, the conflicts with master will need to be resolved. Notably the upgrade to alpine:3.10
.
core/nginx/Dockerfile
Outdated
&& pip3 install idna requests watchdog | ||
RUN apk add --no-cache certbot nginx nginx-mod-mail openssl curl | ||
RUN apk del --no-cache py3-openssl | ||
RUN pip3 install idna requests watchdog | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most changes in this file have nothing to do ARM support. Please revert non-relevant changes. Also, using multiple RUNstatements will create new layers and additional image size. Where possible
RUNoperations need to remain grouped using
&& ` syntax.
docs/rpi_build.rst
Outdated
|
||
- ``DISTRO``: is the main distro used (ie: alpine:3.8) | ||
- ``PHP_DISTRO``: is used for the ``rainloop`` and ``roundcube`` images | ||
- ``EDGE_DISTRO``: is used for ``radicale`` as edge has dulwich and radicale as packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edge is no longer used:
Mailu/optional/radicale/Dockerfile
Line 1 in 13d6cf2
FROM alpine:3.10 |
optional/radicale/Dockerfile
Outdated
|
||
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ | ||
&& apk add --no-cache radicale@testing py-dulwich@testing curl bash | ||
&& apk add --no-cache py3-dulwich@testing curl bash | ||
RUN pip3 install radicale | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why drop official distro package for pip one? This change should not be related to ARM. If it is an improvement by itself, please open a specific pull request.
RUN apk add --no-cache curl \ | ||
&& pip install -r requirements.txt | ||
RUN apk add --no-cache curl python3 py3-pip | ||
RUN pip3 install -r requirements.txt | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep these actions in a single RUN
statement, in order to avoid additional layers.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed the changes all seems good. However, the test build is failing:
Step 9/25 : ARG DISTRO=alpine:3.10
---> Running in 76172496030d
Removing intermediate container 76172496030d
---> 38fbda409b3a
Step 10/25 : FROM $DISTRO
Service 'admin' failed to build: base name ($DISTRO) should not be blank
The command "docker-compose -f tests/build.yml build" failed and exited with 1 during .
It seems that docker cleans up just before running a second FROM
, clearing the environment from one layer to another. Have you tried a local build on a x86_64
?
Ah yes I'm going to take a look at this this week. Thanks.
…On Tue, Aug 27, 2019, 7:07 AM Tim Möhlmann, ***@***.***> wrote:
***@***.**** commented on this pull request.
I've reviewed the changes all seems good. However, the test build is
failing <https://travis-ci.org/Mailu/Mailu/builds/575974626#L1206-L1212>:
Step 9/25 : ARG DISTRO=alpine:3.10
---> Running in 76172496030d
Removing intermediate container 76172496030d
---> 38fbda409b3a
Step 10/25 : FROM $DISTRO
Service 'admin' failed to build: base name ($DISTRO) should not be blank
The command "docker-compose -f tests/build.yml build" failed and exited with 1 during .
It seems that docker cleans up just before running a second FROM,
clearing the environment from one layer to another. Have you tried a local
build on a x86_64?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#985?email_source=notifications&email_token=AACAD23SQJULS4UZVQT2XNTQGUDHLA5CNFSM4HCTH7C2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCZEG6A#pullrequestreview-280118136>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACAD2Y3MDMQUWT6XPNZPFTQGUDHLANCNFSM4HCTH7CQ>
.
|
Does... does... does this mean what I think it means? |
I don't know, what do you think it means ? It build the docker images to
run mailu on a raspberry pi ( and probably other ARM boards).
I still have to make the build pass.
…On Tue, Aug 27, 2019, 11:58 AM Fergal Moran, ***@***.***> wrote:
Does... does... does this mean what I think it means?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#985?email_source=notifications&email_token=AACAD264HTKI76Q2AY6RWE3QGVFJVA5CNFSM4HCTH7C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5IHRUI#issuecomment-525367505>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACAD23PAB3S7DYXCVYOQ2LQGVFJVANCNFSM4HCTH7CQ>
.
|
@abondis Sorry - I've been following this PR with interest for a while... |
Thanks for submitting this pull request. bors try Note: if this build fails, read this. |
tryBuild succeeded |
Oh dear. It passed. 👏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! all looks good to go 1 more small remark.
I will do functionality testing tonight.
Pull request has been modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One very tiny hint from my side, looks good otherwise
setup/Dockerfile
Outdated
RUN apk add --no-cache curl \ | ||
&& pip install -r requirements.txt | ||
RUN apk add --no-cache curl python3 py3-pip | ||
RUN pip3 install -r requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small notice, this should not be split in two layera.
Good catch, I thought I didn't modify it, but I guess it's some extra from
the rebase ... I'll try to take fix it soon. Thanks.
…On Wed, Sep 18, 2019, 2:09 AM kaiyou, ***@***.***> wrote:
***@***.**** requested changes on this pull request.
One very tiny hint from my side, looks good otherwise
------------------------------
In setup/Dockerfile
<#985 (comment)>:
>
RUN mkdir -p /app
WORKDIR /app
COPY requirements.txt requirements.txt
-RUN apk add --no-cache curl \
- && pip install -r requirements.txt
+RUN apk add --no-cache curl python3 py3-pip
+RUN pip3 install -r requirements.txt
Small notice, this should not be split in two layera.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#985?email_source=notifications&email_token=AACAD2452PVJDF3LAICTZI3QKHAY7A5CNFSM4HCTH7C2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCFCELKQ#pullrequestreview-289686954>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACAD2ZH3SUDY2Y4PDU3NO3QKHAY7ANCNFSM4HCTH7CQ>
.
|
Pull request has been modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you for fixing :)
bors r+ |
985: Permit raspberry pi (and other architectures) builds r=mergify[bot] a=abondis ## What type of PR? Enhancement ## What does this PR do? Add an option to select base images and permit building for different CPU architectures. ### Related issue(s) N/A ## Prerequistes - [X] documentation updated accordingly - [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file. Co-authored-by: Aurélien Bondis <aurelien.bondis@gmail.com> Co-authored-by: Aurelien <aurelien.bondis@gmail.com>
Build succeeded |
What type of PR?
Enhancement
What does this PR do?
Add an option to select base images and permit building for different CPU architectures.
Related issue(s)
N/A
Prerequistes