Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.29-bookworm-otel AS builder
FROM nginx:1.31-otel AS builder

RUN apt-get update \
&& apt-get upgrade -y \
Expand Down Expand Up @@ -41,7 +41,7 @@ RUN mkdir -p /app/src \
&& cp -r /app/src/rules /app/etc/rules \
&& rm -rf /app/src /app/src.tar.gz

FROM nginx:1.29-bookworm-otel
FROM nginx:1.31-otel

RUN apt-get update \
&& apt-get upgrade -y \
Expand All @@ -67,7 +67,8 @@ COPY --from=builder /app /app
ADD https://raw.githubusercontent.com/geofabrik/sendfile_osm_oauth_protector/master/oauth_cookie_client.py \
/app/bin/
RUN sed -i -e 's/allow_read_prefs": "yes"/allow_read_prefs": "1"/g' /app/bin/oauth_cookie_client.py
RUN addgroup overpass && adduser --home /db --disabled-password --gecos overpass --ingroup overpass overpass
RUN groupadd overpass && useradd --home-dir /db -m -c "overpass" -g overpass overpass \

@arnesetzer arnesetzer Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

While groupadd remains the same there are some changes to the useradd command:

  1. --home is replaced by -m to create a home directory and --home-dir to specify the home dir location
  2. --gecos is replaced by -c "overpass" which sets the additional name to overpass
  3. --ingroup overpass is replaced by -g overpass
  4. Due to some different permissions between useradd and adduser for the home directory we need to modify the permissions for /db and add the user nginx to the group overpass otherwise we will run in an error on runtime. A quick&dirty alternative would be chmod 755 /db
    DetailsError: runtime error: open64: 13 Permission denied /db/db//osm3s_osm_base Unix_Socket::7

&& chmod 750 /db && usermod -aG overpass nginx

COPY requirements.txt /app/

Expand Down