Skip to content
Snippets Groups Projects
Unverified Commit c8bbef80 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

contrib: Dockerfile: install libnss-unknown

While Podman automatically populates /etc/passwd and /etc/group with
matching entries for the mapped host user, such a feature is missing
from Docker. Install libnss-unknown, which will return passwd entries of
the form "uid-1000" for all unknown UIDs, to avoid warnings and other
weird behaviour that may occur when running as an unnamed user.

`-o` must be passed to useradd now to allow non-unique user entries, as
with libnss-unknown, every UID is considered occupied.
parent 4ada0c4e
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ...@@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ecdsautils \ ecdsautils \
lua-check \ lua-check \
shellcheck \ shellcheck \
libnss-unknown \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
...@@ -30,7 +31,7 @@ RUN mkdir /tmp/ec &&\ ...@@ -30,7 +31,7 @@ RUN mkdir /tmp/ec &&\
mv bin/ec-linux-amd64 /usr/local/bin/editorconfig-checker &&\ mv bin/ec-linux-amd64 /usr/local/bin/editorconfig-checker &&\
rm -rf /tmp/ec rm -rf /tmp/ec
RUN useradd -m -d /gluon -u 100 -g 100 gluon RUN useradd -m -d /gluon -u 100 -g 100 -o gluon
USER gluon USER gluon
VOLUME /gluon VOLUME /gluon
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment