-
Notifications
You must be signed in to change notification settings - Fork 311
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
Docker arm images #34
Comments
I'd love to but right now I don't know exactly how. It seems it would require creating a second Dockerfile, say Does that sound right? Or is there an easier way? PR's on this are very welcome if you know better than I how to do it. |
I'm not sure what your build platform is but docker has a way of building for multiple architectures using the buildx plugin. |
OK so if I use those then I can't have DockerHub generate an image when I push to github, but I can build an arm image and push it to Dockerhub myself? I guess arm64 support may only be for releases but that's simple enough, I'll add it to the process. |
@casjay I've managed to learn docker buildx and make it produce linux/arm64 images. At the moment, however, both of my Raspberry Pi's are in a storage unit and I can't test it. The output looks normal:
|
No dice yet |
Sorry for the very delayed response. So you would need to update your docker image to one that supports arm64. The following is untested but it could be a starting point.FROM alpine:3.15.7 AS alpine-glibc
ENV GLIBC_VERSION 2.31-r0
# Download and install glibc
RUN apk add --update curl && \
curl -Lo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
curl -Lo glibc.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" && \
curl -Lo glibc-bin.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk" && \
apk add glibc-bin.apk glibc.apk && \
/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib && \
echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \
apk del curl && \
rm -rf glibc.apk glibc-bin.apk /var/cache/apk/*
FROM alpine-glibc as builder
ENV APP_HOME="/i2p"
WORKDIR /tmp/build
COPY . .
RUN add-pkg --virtual build-base gettext tar bzip2 apache-ant openjdk17 \
&& echo "build.built-by=Docker" >> override.properties \
&& ant preppkg-linux-only \
&& rm -rf pkg-temp/osid pkg-temp/lib/wrapper pkg-temp/lib/wrapper.* \
&& del-pkg build-base gettext tar bzip2 apache-ant openjdk17
FROM alpine-glibc
ENV APP_HOME="/i2p"
RUN add-pkg openjdk17-jre ttf-dejavu
WORKDIR ${APP_HOME}
COPY --from=builder /tmp/build/pkg-temp .
# "install" i2p by copying over installed files
COPY docker/rootfs/ /
# Mount home and snark
VOLUME ["${APP_HOME}/.i2p"]
VOLUME ["/i2psnark"]
EXPOSE 7654 7656 7657 7658 4444 6668 7659 7660 4445 12345
# Metadata.
LABEL \
org.label-schema.name="i2p" \
org.label-schema.description="Docker container for I2P" \
org.label-schema.version="1.0" \
org.label-schema.vcs-url="https://github.com/i2p/i2p.i2p" \
org.label-schema.schema-version="1.0" |
Given the baseimage was merged, is there anything else blocking this issue? There still aren't arm64-compatible on the geti2p docker registry :/ |
Literally ability to test it. I don't want to push a broken image, all I need is somebody to buildx it on an x86_64 machine, transfer it to a Raspberry Pi or something, and run it. |
I can test that, the image already builds on my rpi, and github makes it easy to add arm architecture to it's workflows via qemu and whatnot. Also docker supports arch emulation according to the documentation, the result will be the same as native compile, but slower |
I've confirmed it working: built multiarch image on x86 machine and transferred to arm64. I've only tested the webconsole and eepsite access functionalities of the client, however. |
Good enough for me. 2.4.0 will be made available for arm64 soon. |
Are there any plans on updating the docker image to support ARM?
The text was updated successfully, but these errors were encountered: