Skip to content

Commit

Permalink
fixed permissions.
Browse files Browse the repository at this point in the history
  • Loading branch information
muratgozel committed Sep 20, 2021
1 parent 50b5360 commit fa33601
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ LABEL org.opencontainers.image.source="https://github.com/muratgozel/postgresql-
LABEL org.opencontainers.image.title="PostgreSQL pgBackRest"
LABEL org.opencontainers.image.description="PostgreSQL server with pgBackRest backup/restore tool."

ENV LANG=en_US.utf8
ENV PGVERSION=13.3
ENV PGPORT=5432
ENV PGUSER=postgres
ENV PGDATA=/usr/local/pgsql/data
ENV PG_BACKREST_VERSION=2.35
ENV PGUSER_UID=2001
ENV PGUSER_GID=2001
ENV LANG=en_US.utf8

COPY ./entrypoint.sh /entrypoint.sh

Expand All @@ -21,12 +21,12 @@ RUN apk add --no-cache --virtual .build-deps gcc g++ make wget pkgconf dpkg-dev
bzip2-dev zlib-dev libuuid linux-headers \
tzdata yaml-dev util-linux-dev && \
apk add --no-cache git bash python3 py3-pip icu libxml2 lz4-dev zstd-dev \
postgresql-dev && \
postgresql-dev shadow && \
# configure dependencies
ln -sf python3 /usr/bin/python && \
mkdir -p /downloads && \
addgroup --gid ${PGUSER_GID} $PGUSER && \
adduser --disabled-password --uid ${PGUSER_UID} --ingroup $PGUSER --gecos "" -s /bin/bash $PGUSER && \
addgroup --gid $PGUSER_GID $PGUSER && \
adduser --disabled-password --uid $PGUSER_UID --ingroup $PGUSER --gecos "" -s /bin/bash $PGUSER && \
# download pgbackrest
cd /downloads && \
wget https://github.com/pgbackrest/pgbackrest/archive/release/$PG_BACKREST_VERSION.tar.gz && \
Expand Down
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

usermod -u $PGUSER_UID $PGUSER
groupmod -g $PGUSER_GID $PGUSER

pgconf="$PGDATA/postgresql.conf"
hbaconf="$PGDATA/pg_hba.conf"

Expand Down

0 comments on commit fa33601

Please sign in to comment.