Thanks so much for sharing these details, @Elliot_Shepherd!
Updated for newer retool version.
FROM tryretool/backend:3.75.1-stable AS retool
# amd64 build
FROM retool as build-amd64
# arm64 build
FROM node:16-bullseye as build-arm64
# no openjdk-11-jdk on bookworm
# install dependencies (replace jre with jdk to allow java node dep to build)
RUN apt-get update && apt-get install -y curl unzip wget openjdk-11-jdk gosu tini iptables procps dnsutils libaio1 libpq-dev libssl-dev tdsodbc
ENV APP_ROOT=/retool_backend
ENV PATH=/retool_backend/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# copy the built application
COPY --from=retool /node_modules/ /node_modules/
COPY --from=retool /package.json /package.json
COPY --from=retool /yarn.lock /yarn.lock
COPY --from=retool /retool_backend/ /retool_backend/
COPY --from=retool /retool_frontend_serverside/ /retool_frontend_serverside/
WORKDIR /retool_backend
# override a few of the dependencies, that have a native component
# retool uses nodegit@0.28.0-alpha.11 - but 11 wont build on arm
RUN mkdir temp && cd temp && pnpm init && \
pnpm add lz4@0.6.5 nodegit@0.28.0-alpha.12 java@0.13.0
RUN cd temp && \
rsync -a node_modules/lz4 /retool_backend/node_modules/lz4 && \
rsync -a node_modules/nodegit /retool_backend/node_modules/nodegit && \
rsync -a node_modules/java /retool_backend/node_modules/java && \
cp node_modules/lz4/build/Release/lz4.node /retool_backend/bundle/lz4-HXUIKTBD.node && \
cp node_modules/lz4/build/Release/xxhash.node /retool_backend/bundle/xxhash-5DNGXW2V.node && \
cp node_modules/nodegit/build/Release/nodegit.node /retool_backend/node_modules/.pnpm/nodegit@0.28.0-alpha.11_patch_hash=t2g22a3cflk65wz3kqpekiolbu/node_modules/nodegit/build/Release/nodegit.node && \
cp node_modules/java/build/Release/nodejavabridge_bindings.node /retool_backend/node_modules/.pnpm/java@0.13.0/node_modules/java/build/Release/nodejavabridge_bindings.node
# create the user/group and set the file permissions (from the official image)
RUN mkdir -p /home/retool_user \
&& groupadd --gid 999 retool_user_group \
&& useradd --system --uid 999 --gid retool_user_group retool_user \
&& chown retool_user:retool_user_group --recursive /home/retool_user \
&& chown retool_user:retool_user_group --recursive /root \
&& chown retool_user:retool_user_group --recursive /retool_backend \
&& chmod --recursive a+rwX /home/retool_user \
&& chmod --recursive a+rwX /root \
&& chmod --recursive a+rwX /retool_backend
RUN chown retool_user:retool_user_group ${APP_ROOT} \
&& chmod 777 ${APP_ROOT}
USER retool_user
ENTRYPOINT ["/retool_backend/docker_scripts/start_api.sh"]
# final image
FROM build-${TARGETARCH}
Thanks for updating the topic, @Elliot_Shepherd!
Here is an alternative to ngrok that I use
I was looking into deploying Retool for a customer that is running several Ampere ARM servers and was quite surprised that no arm64 image/support is available for Retool. Would be good to have official arm64 support since Retool is no option anymore sadly.
Hi @passlickdev! Thanks for reaching out and welcome to the community.
We have a long-standing ticket in our backlog for adding official arm64
support, which I'll bump on your behalf. That said, the only real requirement for deploying Retool in its current form is being able to run Docker! The underlying server architecture shouldn't have any effect upon Docker's ability to build linux/amd64
images.
Hey Darren,
thank you for your reply. Unfortunately, this does not match my experience. I have tried a lot but have not been able to get the image to run properly on an ARM64 server, the whole console is overflowing with error messages that are obviously related to the CPU architecture.
In the meantime, we have evaluated UI Bakery and have come to the conclusion that it is a very good, competitive alternative to Retool, which can run on ARM servers without any problems, so we are probably already well served.
Best regards
Ah that does make sense. You'd probably need to install an additional translation layer, similar to Rosetta on macOS. It's possible but certainly not trivial.
I'll definitely take this feedback to the team, as mentioned previously, and keep this thread updated as I get updates. We'd love for Retool to be an option in the future, even if it's not a good fit right now!