Dockerfile 453 B

123456789101112131415161718
  1. FROM postgres:17.2
  2. ARG USER_ID
  3. ARG GROUP_ID
  4. RUN apt-get update && apt-get install -y sudo;
  5. RUN addgroup --gid ${GROUP_ID} labkey
  6. RUN adduser --gecos 'LabKey' --uid ${USER_ID} --gid ${GROUP_ID} --disabled-password labkey
  7. RUN echo 'labkey ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
  8. RUN usermod -G root,sudo labkey
  9. RUN chown -R labkey:labkey /var/lib/postgresql \
  10. && chown -R labkey:labkey /var/run/postgresql
  11. USER labkey
  12. LABEL "name"="postgresqlX"