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

Repository on Ubuntu has different versions for X86 and ARM, with different library locations #266

Open
xgretsch opened this issue Nov 1, 2023 · 3 comments

Comments

@xgretsch
Copy link

xgretsch commented Nov 1, 2023

I have just discovered that GeoIP was failing on my production server (which is x86), while working on my development system (which is a newish Mac, and therefore arm).

This is because the library locations are different: on the production server, it's in /usr/share (as described in the documentation), whereas on the dev system, it's /var/lib.

This seems to be associated with the versions being different. On the dev system, I'm getting v4.10.0-1. On the live system, it's v6-0.0-0.

I'm using the same Dockerfile commands for both:

# Start with a base Ubuntu image
FROM ubuntu:23.04

ARG xdebug

# Prevent any prompts during installation
ENV DEBIAN_FRONTEND noninteractive

# Set up apt with any additional repositories we need
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:maxmind/ppa
RUN apt-get update --fix-missing
RUN apt upgrade -y
RUN apt-get install -y geoipupdate

However, the Docker build commands are different (obviously)

For the live site:

docker buildx build --platform linux/x86_64 .

For the dev site:

docker build .

Can someone update the Github repository, please, so that we get the same version on both platforms?

@oschwald
Copy link
Member

oschwald commented Nov 1, 2023

Our PPA currently doesn't provide ARM builds. We don't have immediate plans to add them, but we can look at how much work is involved next time we do a release.

Given that you are using Docker, is there are reason why you aren't using our official images? We do support ARM64 for those.

@oschwald
Copy link
Member

oschwald commented Nov 1, 2023

Also, if you set the DatabaseDirectory, you should be able to avoid the underlying issue you are running into when switching between the Debian/Ubuntu packages and the PPA packages.

@xgretsch
Copy link
Author

xgretsch commented Nov 1, 2023

@oschwald The reason for not using official images is kind of annoying: I'm using a Google VM with their "container-oriented OS", which only allows me to use a single image. So I'm starting from Docker's "ubuntu:23.04" image and I don't have a way of combining it with a second image from elsewhere (e.g. yours). That's my understanding of the Google documentation, anyway - I'm happy for that to be corrected if it's wrong.

I'll have a look at setting the DatabaseDirectory in GeoIP.conf - that sounds like it might work. As of this morning, I'm now accounting for the variation in my build file, but your suggestion would be more stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants