Compare commits
2 Commits
4a81e73192
...
98d2fc700e
Author | SHA1 | Date |
---|---|---|
Rick Altherr | 98d2fc700e | |
Rick Altherr | 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}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
export COMMIT_DATE=$(date -u -Idate -d @$(git show -s --format=%ct))
|
||||||
|
export TAG=${COMMIT_DATE}.$(git rev-parse HEAD)
|
||||||
|
podman image build . -t gitea.treehouse.systems/treehouse/barman:${TAG}
|
||||||
|
podman tag gitea.treehouse.systems/treehouse/barman:2024-12-09.4a81e73192649d7ad5cdfbdfec94f59e4e145a5b gitea.treehouse.systems/treehouse/barman:latest
|
Loading…
Reference in New Issue