Fix barman user's home directory
parent
4a81e73192
commit
04ff977245
|
@ -13,10 +13,12 @@ RUN curl -o /etc/apt/trusted.gpg.d/apt.postgresql.org.asc --fail https://www.pos
|
||||||
# Create barman user
|
# Create barman user
|
||||||
ENV BARMAN_UID=999
|
ENV BARMAN_UID=999
|
||||||
ENV BARMAN_GID=999
|
ENV BARMAN_GID=999
|
||||||
|
ENV BARMAN_DATA_DIR=/var/lib/barman
|
||||||
|
|
||||||
RUN groupadd --system -g ${BARMAN_GID} barman && \
|
RUN groupadd --system -g ${BARMAN_GID} barman && \
|
||||||
useradd --system \
|
useradd --system \
|
||||||
-u ${BARMAN_UID} -g ${BARMAN_GID} \
|
-u ${BARMAN_UID} -g ${BARMAN_GID} \
|
||||||
|
-d ${BARMAN_DATA_DIR} \
|
||||||
--shell /bin/bash \
|
--shell /bin/bash \
|
||||||
barman
|
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
|
&& sed -i 's/\(.*pam_loginuid.so\)/#\1/' /etc/pam.d/cron
|
||||||
|
|
||||||
ENV BARMAN_CONF_DIR=/etc/barman.d/
|
ENV BARMAN_CONF_DIR=/etc/barman.d/
|
||||||
ENV BARMAN_DATA_DIR=/var/lib/barman
|
|
||||||
ENV BARMAN_CRON_SCHEDULE="* * * * *"
|
ENV BARMAN_CRON_SCHEDULE="* * * * *"
|
||||||
|
|
||||||
VOLUME ${BARMAN_DATA_DIR}
|
VOLUME ${BARMAN_DATA_DIR}
|
||||||
|
@ -42,4 +43,4 @@ VOLUME ${BARMAN_CONF_DIR}
|
||||||
COPY entrypoint.sh /
|
COPY entrypoint.sh /
|
||||||
ENTRYPOINT ["tini", "--", "/entrypoint.sh"]
|
ENTRYPOINT ["tini", "--", "/entrypoint.sh"]
|
||||||
CMD ["cron", "-L", "3", "-f"]
|
CMD ["cron", "-L", "3", "-f"]
|
||||||
WORKDIR ${BARMAN_DATA_DIR}
|
WORKDIR ${BARMAN_DATA_DIR}
|
||||||
|
|
Loading…
Reference in New Issue