-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
armv7l failed to build docker image #14125
Comments
You only need to run docker as root. git clone https://github.com/tootsuite/mastodon
cd mastodon
sudo docker build . |
Yeah, this is a known bug with To bypass that, don't change |
I changed the Gemfile.lock as you said and tried to build multiple times. The build got almost to the end, but each time it ends with the same error message
If the build is failing because there was a config file I was supposed to edit, I did not do that. I couldnt find any guides in the documentation for building a docker image either. |
It seems like this failure be webpack being out of memory. In this case, I would try to make sure I have several GB of free RAM before doing the |
You were right. |
I've been trying to get it to build since I saw your message. Initially the build kept failing when trying to build db, so I had to do Now I get this new error message. I think it is failing because it cannot be built on arm maybe?
|
Hm… can you apply this patch and retry? diff --git a/Dockerfile b/Dockerfile
index fa6abad5a..fa502b3a8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -99,20 +99,13 @@ RUN apt update && \
RUN apt -y --no-install-recommends install \
libssl1.1 libpq5 imagemagick ffmpeg \
libicu66 libprotobuf17 libidn11 libyaml-0-2 \
- file ca-certificates tzdata libreadline8 && \
+ file ca-certificates tzdata libreadline8 tini && \
apt -y install gcc && \
ln -s /opt/mastodon /mastodon && \
gem install bundler && \
rm -rf /var/cache && \
rm -rf /var/lib/apt/lists/*
-# Add tini
-ENV TINI_VERSION="0.18.0"
-ENV TINI_SUM="12d20136605531b09a2c2dac02ccee85e1b874eb322ef6baf7561cd93f93c855"
-ADD https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini /tini
-RUN echo "$TINI_SUM tini" | sha256sum -c -
-RUN chmod +x /tini
-
# Copy over mastodon source, and dependencies from building, and set permissions
COPY --chown=mastodon:mastodon . /opt/mastodon
COPY --from=build-dep --chown=mastodon:mastodon /opt/mastodon /opt/mastodon
@@ -135,5 +128,5 @@ RUN cd ~ && \
# Set the work dir and the container entry point
WORKDIR /opt/mastodon
-ENTRYPOINT ["/tini", "--"]
+ENTRYPOINT ["/usr/bin/tini", "--"]
EXPOSE 3000 4000 |
Why are we even adding tini? Docker has that inbuilt behind the init flag. |
I don't know. tini has been first explicitly used in #6514 and first explicitly downloaded from github in #10100. I don't know how people are currently using our |
We probably can't drop it without breaking setups. You would need to add |
Still gives an error when I do
My Dockerfile:
|
Ah, right, tini isn't in bionic… could you apply glitch-soc@9ea91bb too? |
Ill try to automate this so I dont make the same stupid mistake again. I am using a patch file arm.patch to automate it a little.
Here is my Dockerfile. (I feel like Im spamming this page, so Ill just dumped things into pastebin unless someone says otherwise) This is the output: apt gives some permission error when using tar (apparently the error can be supressed using -m or something, but I dont have access to tar from deb):
I can't tell if there is something wrong with the ubuntu:20.04 image for armhf. When I try to install any package it errors about this one package
|
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1867675 Apparently this is an issue with running too recent ubuntu versions in Docker on armhf, and the upcoming fix would be for the host system running Docker, not the image/within the container. |
I finaly built it and learned a lot about Docker along the way.
EDIT: Fixed an error in diff above |
I don't know if it should be closed, us using a version of Ubuntu that doesn't work on some platforms isn't great, and so is us downloading a x64 binary isn't great either. |
Do you want me to open it again? Maybe if I have time later I might help make a multi-arch docker build. Im surprised mastodon doesnt use |
Basically |
Problem
I am using raspbian with armv7l, and I cannot build the package from source and I cannot build from docker either. Docker does not build for me and this is what the issue is about.
I am not familiar with Ruby and Docker so I cant decipher whats going on.
My guess is that either I am doing the build wrong (and so it gives me an error when building something for a different architecture x86.S because maybe I need to give it more info) or that there is a bug in the program.
My System
To Recreate
I cloned this repo and then cd'd into the directory and did
docker build ./
The Error
My Attempt at a Fix
I went to the Gemfile and added
gem 'bcrypt', '~> 3.1.13'
. This game me a new error message.The text was updated successfully, but these errors were encountered: