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
arm64 compatible docker #4
Comments
Arm build now available, as i don't have a pi flying around rn could you verify it working? Build times went from 9min to 45 though 😆🙈 |
Hi, thanks for that, appreciate it. works fine that usually happens with wrong architecture (cryptgeon_memcached_1 is running, app_1 stopping) would mind having a look at that? |
Mhh I see, could you clone the repo and build the container locally and see what happens? git clone https://github.com/cupcakearmy/cryptgeon.git
docker-compose up
# Go to http://localhost |
after some minutes, it stops wit this: |
I see FROM node:16-alpine as CLIENT
WORKDIR /tmp
COPY ./client ./
RUN npm ci
RUN npm run build
FROM rust:1.51-alpine as RUST
WORKDIR /tmp
RUN apk add libc-dev openssl-dev alpine-sdk
COPY ./Cargo* ./
COPY ./src ./src
RUN cargo build --release
FROM scratch
WORKDIR /app
COPY --from=RUST /tmp/target/release/cryptgeon .
COPY --from=CLIENT /tmp/build ./client/build
ENV MEMCACHE=memcached:11211
ENTRYPOINT [ "/app/cryptgeon" ] can you try with this Dockerfile? |
Proably have to run |
What I've done now:
Took quite a while, but... error: |
Uff, thats some trial and error xD FROM node:16-alpine as CLIENT
WORKDIR /tmp
COPY ./client ./
RUN npm ci
RUN npm run build
FROM rust:1.51-alpine as RUST
WORKDIR /tmp
RUN apk add libc-dev openssl-dev alpine-sdk
COPY ./Cargo* ./
COPY ./src ./src
RUN cargo build --release
FROM alpine
WORKDIR /app
COPY --from=RUST /tmp/target/release/cryptgeon .
COPY --from=CLIENT /tmp/build ./client/build
ENV MEMCACHE=memcached:11211
ENTRYPOINT [ "/app/cryptgeon" ] Could you try this file? (don't neet to delete the local copy) |
Can't blame you if you want to stop ;)
|
Mhhh thats weird, maybe I'll dust out some old pi and do some debugging. Can't promise anything |
You are arm64 right? |
uname -a That's Ubuntu 64Bit on my Rpi4 |
Yeah aarch64 ist arm64. Thanks for the info |
never mind if it's too much work, appreciate your help but it is maybe not worth wasting your hours on that topic. |
I'll remove the arm images for now |
Hi, this is how i build a multi arch Image with GitHub Workflows: https://github.com/ThisIsBenny/n8n/blob/main/.github/workflows/build_images.yml Result: |
We had arm builds (https://github.com/cupcakearmy/cryptgeon/blob/cfe525f274b6e364f3d9b2a953434bd1cad18bbe/.github/workflows/docker.yml), but they did have some runtime errors, have not found the time yet to check on a raspi xD |
I think the issue is that you are not referencing to the
Without the reference, the build will be happen with the normal builder which doesn‘t support multi arch build until now. You can also add some logging, for example for the Rust and the alpine image: FROM <image-name>
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" |
I followed the official docs, but they might be outdated Will try with default install https://github.com/docker/setup-buildx-action#install-by-default |
@cyrrelsneer can you try 1.1.1 version? |
Hi, is aarch64 suported now? I'm getting this error on Ubuntu aarch64 VPS server. |
Very good question. I have no arm machine to verify it unfortunately :/ Maybe I could rent some VMs and test it out if I find time. I know the error message, it's when building go with c bindings and then running it on
TBH, I'm quite confused |
@vladosam could you try building and running the docker file with FROM node:16-alpine as CLIENT
ENV CGO_ENABLED=0
WORKDIR /tmp
COPY ./client ./
RUN npm install -g pnpm
RUN pnpm install
RUN pnpm run build
FROM rust:1.51-alpine as RUST
ENV CGO_ENABLED=0
WORKDIR /tmp
RUN apk add libc-dev openssl-dev alpine-sdk
COPY ./Cargo* ./
COPY ./src ./src
RUN cargo build --release
FROM scratch
WORKDIR /app
COPY --from=RUST /tmp/target/release/cryptgeon .
COPY --from=CLIENT /tmp/build ./client/build
ENV MEMCACHE=memcached:11211
EXPOSE 5000
ENTRYPOINT [ "/app/cryptgeon" ] |
I created Dockerfile but i can't build it.
|
Are you sure you are in the right context? step 4 cannot fail really |
Otherwise try the following steps:
|
You where right. I was in wrong directory. But issue is still there.
|
Can you try with the comment before? #4 (comment) |
You mean docker-compose up? I'll try it later. |
Yeah with alpine instead of from scratch in the dockerfile |
Nope.
|
Is there any update on this? I would like to have this arm64 support as well. |
Unfortunately I'm kind of powerless. I need you guys with arm to test it. |
Just say what to try. |
Let me know what to try. I would try as well. Thanks |
@vladosam @0xSh1v4 apparently the docker image does not work on arm. If you could get it to work I could commit the changes and release docker images for everyone. Some things that I would try is running form alpine and not from scracth in the Dockerfile. To build it you can just use |
I tried that before and it didn't work. |
Could you try the latest release? |
|
Hi,
it would be most welcome to get a docker image that is arm64 compatible.
The text was updated successfully, but these errors were encountered: