You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all, sorry if I'll be missing important info here, i'm really unexperienced with linkers, compilers and stuff like that.
I am developing a Rust app that seems to be using ring as one of its sub-dependencies. Until now I built using the official rust docker image and deployed it into a debian-slim-bookworm container, which works just fine for amd_64 and arm64 containers. I however wanted to try to reduce the final image size and thus tried to switch to a musl-based clux/muslrust build image and a final alpine:3.20 deployment container. Everything works just fine with amd_64, but ring seems to fail the build process when building for arm64 (aarch64). Here's the dockerfile:
FROM node:20 AS client_build_image
WORKDIR /app
COPY ./client /app
COPY ./server/Cargo.toml /app/Cargo.toml
RUN npm install && npm run build
FROM clux/muslrust:1.79.0-stable AS server_build_image
# create a new empty shell project
RUN USER=root cargo new --bin /hitster
WORKDIR /hitster
# copy over your manifests
COPY ./server/Cargo.toml ./Cargo.toml
# this build step will cache your dependencies
RUN cargo build --release && \
rm ./src/*.rs
# copy your source tree
COPY ./server/migrations ./migrations
COPY ./server/src ./src
COPY ./server/build.rs ./build.rs
COPY ./server/etc ./etc
# build for release
RUN rm ./target/x86_64-unknown-linux-musl/release/deps/hitster* && \
cargo build --release
FROM alpine:3.20
# yt-dlp version
ARG YT_DLP_BUILD_VERSION=2024.07.09
WORKDIR /hitster
ENV CLIENT_DIRECTORY=/hitster/client
ENV PATH="$PATH:/opt/ffmpeg/bin/"
ENV USE_YT_DLP=true
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
# prepare the OS
RUN set -x && \
apk update && \
apk upgrade -a && \
apk add --no-cache ca-certificates ffmpeg python3 py3-mutagen && \
mkdir /.cache && \
chmod 777 /.cache
# copy the build artifact from the build stage
COPY --from=server_build_image /hitster/target/x86_64-unknown-linux-musl/release/hitster-server /hitster/server/hitster
COPY --from=client_build_image /app/dist /hitster/client
# yt-dlp
ADD --chmod=777 https://github.com/yt-dlp/yt-dlp/releases/download/${YT_DLP_BUILD_VERSION}/yt-dlp /usr/local/bin/yt-dlp
# set the startup command to run your binary
CMD ["/hitster/server/hitster"]
I know I do have a different problem within my final stage with being unable to copy the build from the correct path when building for arm64, but the build process already fails before reaching that point with an error like this:
I'm trying to build with good old docker build -t hitster --platform linux/arm64 .
I don't know if i'm doing anything wrong or if ring is the issue, but maybe someone is able to help me? Thank you. Please let me know if I can give you any more useful information.
The text was updated successfully, but these errors were encountered:
I had the exact same error, and this was the final magic to getting ring built as a dependency of another project (or sub[, sub ...]dep... I'm not even sure to what, exactly).
Hello,
first of all, sorry if I'll be missing important info here, i'm really unexperienced with linkers, compilers and stuff like that.
I am developing a Rust app that seems to be using ring as one of its sub-dependencies. Until now I built using the official rust docker image and deployed it into a debian-slim-bookworm container, which works just fine for amd_64 and arm64 containers. I however wanted to try to reduce the final image size and thus tried to switch to a musl-based clux/muslrust build image and a final alpine:3.20 deployment container. Everything works just fine with amd_64, but ring seems to fail the build process when building for arm64 (aarch64). Here's the dockerfile:
The project repository with all the necessary files can be found here: https://github.com/Timtam/hitster
I know I do have a different problem within my final stage with being unable to copy the build from the correct path when building for arm64, but the build process already fails before reaching that point with an error like this:
I'm trying to build with good old docker build -t hitster --platform linux/arm64 .
I don't know if i'm doing anything wrong or if ring is the issue, but maybe someone is able to help me? Thank you. Please let me know if I can give you any more useful information.
The text was updated successfully, but these errors were encountered: