Fix barman user's home directory

main
Rick Altherr 2024-12-11 19:59:43 -08:00
parent 4a81e73192
commit 04ff977245
1 changed files with 3 additions and 2 deletions

View File

@ -13,10 +13,12 @@ RUN curl -o /etc/apt/trusted.gpg.d/apt.postgresql.org.asc --fail https://www.pos
# Create barman user
ENV BARMAN_UID=999
ENV BARMAN_GID=999
ENV BARMAN_DATA_DIR=/var/lib/barman
RUN groupadd --system -g ${BARMAN_GID} barman && \
useradd --system \
-u ${BARMAN_UID} -g ${BARMAN_GID} \
-d ${BARMAN_DATA_DIR} \
--shell /bin/bash \
barman
@ -33,7 +35,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& sed -i 's/\(.*pam_loginuid.so\)/#\1/' /etc/pam.d/cron
ENV BARMAN_CONF_DIR=/etc/barman.d/
ENV BARMAN_DATA_DIR=/var/lib/barman
ENV BARMAN_CRON_SCHEDULE="* * * * *"
VOLUME ${BARMAN_DATA_DIR}
@ -42,4 +43,4 @@ VOLUME ${BARMAN_CONF_DIR}
COPY entrypoint.sh /
ENTRYPOINT ["tini", "--", "/entrypoint.sh"]
CMD ["cron", "-L", "3", "-f"]
WORKDIR ${BARMAN_DATA_DIR}
WORKDIR ${BARMAN_DATA_DIR}