Skip to content
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

Create Dockerfile.armv7 #353

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Create Dockerfile.armv7 #353

wants to merge 3 commits into from

Conversation

r1ckr
Copy link

@r1ckr r1ckr commented Jan 31, 2018

Adding support for armv7 to make it compatible with most of Raspbian distributions. File is exactly the same as aarch64 but taking the base image from the hypriot guys, since it supports the build of it from an x86 machine.

I am currently running this on a RPi3 with Raspbian 9 32 bits and works perfect.

Adding support for armv7 to make it compatible with most of Raspbian distributions. File is exactly the same as aarch64 but taking the base image from the hypriot guys, since it supports the build of it from an x86 machine. 

I am currently running this on a RPi3 with Raspbian 9 32 bits and works perfect.
@kylemanna
Copy link
Owner

Do the Travis-CI tests run on the image in an emulated environment?

@buchdag
Copy link
Contributor

buchdag commented Feb 1, 2018

@kylemanna it probably won't, that's pretty much the same approach as #292

What I said last on the issue still stands, the current base Dockerfile can be used to build a working image (ie one that pass all the tests when run locally on the desired arch) on either arm or arm64, there is no need for the additional aarch64 Dockerfile nor for an armv7 one.

@r1ckr
Copy link
Author

r1ckr commented Feb 4, 2018

If you want to use the same base image to build different archs you would need to run the build inside an ARM machine. The base image from the hypriot guys contains a QEMU binary that allows the build and run of that image in any x86 node. So now is possible to build both x86 and ARM using the same build agent in travis.

I've updated the .travis-ci with the instructions to run build the images and run the tests, they seem to be passing now. Will be handy to have this armv7 added in the push to Docker Hub automatically.

@buchdag
Copy link
Contributor

buchdag commented Feb 4, 2018

@r1ckr please read the discussion on #292.

That PR is the same idea as yours, the only difference was basing it off scaleway multiarch's images instead of hypriot (both are based on the same idea of including and using QEMU).

It did not work because some tests fail for reasons we can't fix (however they all pass when ran on a real arm or arm64 host with an image built straight from the existing Dockerfile).

In your PR Travis is actually not running the openvpn tests against the arm image even after the update for the same reasons stated in this message.

@r1ckr
Copy link
Author

r1ckr commented Feb 4, 2018

I see what you mean and it's weird alright, tests should've been failed and they just return 0 without running. Saw the last paragraph and now understand why there's no arm image in dockerhub, you want support for it in travis.

@gaborvecsei
Copy link

I wanted to build an image with your modified Dockerfile on my RPI3, but unfortunately I got the following message for step 3:

fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/armhf/APKINDEX.tar.gz
fetch http://dl-4.alpinelinux.org/alpine/edge/community/armhf/APKINDEX.tar.gz
fetch http://dl-4.alpinelinux.org/alpine/edge/testing/armhf/APKINDEX.tar.gz
WARNING: This apk-tools is OLD! Some packages might not function properly.
ERROR: unsatisfiable constraints:
  openssl1.0 (missing):
    required by: easy-rsa-3.0.4-r1[openssl1.0]

@KeithSSmith
Copy link

Ran into the same issue @gaborvecsei has on step 3. was able to get around it by changing it to the following:

RUN echo "http:https://dl-cdn.alpinelinux.org/alpine/v3.6/main" >> /etc/apk/repositories && \
    echo "http:https://dl-cdn.alpinelinux.org/alpine/v3.6/community" >> /etc/apk/repositories && \
    echo "http:https://dl-4.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
    apk add --update openvpn iptables bash easy-rsa openvpn-auth-pam google-authenticator pamtester && \
    ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
    rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*

@gmcinalli
Copy link

gmcinalli commented Jan 8, 2019

@buchdag Hi, so at this time it is not possible to execute this project on a RPI3 if not modifying the Dockerfile?

EDIT: Ok, I think I found the answer I was looking for, the official images are downloaded automatically with the correct architecture (source).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants