Skip to content
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

Moving to debian-based docker image. Fixes #3972 #4004

Merged
merged 21 commits into from
Oct 11, 2023
Merged

Conversation

dessalines
Copy link
Member

@dessalines dessalines commented Oct 1, 2023

The new dev image is ~ 192 MB .

I tried using the distroless images, but unfortunately we need both libpq and openssl, which I couldn't find a good image for.

@dessalines
Copy link
Member Author

Seems also to be an issue with building ring on arm64. I'm trying out the fix suggested here: briansmith/ring#1514

@@ -239,7 +237,9 @@ steps:
settings:
repo: dessalines/lemmy
dockerfile: docker/Dockerfile
platforms: linux/amd64,linux/arm64
# TODO fix arm build: see: https://woodpecker.join-lemmy.org/repos/129/pipeline/2888/20
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this run for why arm builds are broken with this change: ring isn't compiling on arm. I tried with a few fixes linked, but none of them worked.

@dessalines dessalines marked this pull request as ready for review October 1, 2023 15:27
@dessalines
Copy link
Member Author

dessalines commented Oct 1, 2023

This is ready to go now.

I tried and failed at getting arm builds to work again (see comments above). I tried to ping some people like @TheSilkky to fix, but haven't gotten any response.

I think unfortunately we're going to have to resort to the tactic of break arm builds, then when someone sees they're not working, they'll devote some time to getting them working.

@TheSilkky
Copy link
Contributor

TheSilkky commented Oct 1, 2023

@dessalines You haven't included a gcc cross compiler toolchain in the builder. That's probably why it's failing to compile on ARM because it's trying to compile C code and can't. The blackdex musl image includes this and for some reason there's not many options for glibc.

This is how Vaultwarden handles arm64 glibc builds, might be a good reference

@TheSilkky
Copy link
Contributor

Is this whole thing actually necessary, what is actually being gained by switching to debian?

@dessalines
Copy link
Member Author

Ppl have been having reliability issues with the musl ones.

Ah I see you commented on the issue, i'll move the convo over there.

@lazyguru
Copy link

lazyguru commented Oct 3, 2023

Hi, it looks like you are changing the base docker image here. There is a bug in the existing image for 0.19.beta.5 that I've documented and fixed in #4011. I also see the current Dockerfile here removes the creation of the lemmy user and running under it. Will the final image support running the process as a non-privileged user?

@Nutomic
Copy link
Member

Nutomic commented Oct 4, 2023

Based on comments in Matrix you need to add apt update && apt install ca-certificates to make federation work.

@dessalines
Copy link
Member Author

@lazyguru nevermind, I got it handled (I think).

@dessalines
Copy link
Member Author

dessalines commented Oct 4, 2023

I tried to use the older cross-compile image for ARM only, but it didn't work. You need to have the exact same runner, otherwise it won't work (and one uses debian, the other alpine)

For now I've commented out the arm64 blocks until someone can take a stab at it.

@dessalines dessalines merged commit 645bf21 into main Oct 11, 2023
1 of 2 checks passed
@Nutomic Nutomic mentioned this pull request Oct 13, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants