Skip to content

Commit 83267fa

Browse files
committed
chore(docker): ensure PostgreSQL data directory exists and set timezone
1 parent fac7516 commit 83267fa

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

postgres18/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ LABEL description="Postgres18 image for CSlant development"
77
# Set Timezone
88
#####################################
99
ARG TZ=Asia\Ho_Chi_Minh
10-
ENV TZ ${TZ}
11-
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R postgres:root /var/lib/postgresql/data
10+
ENV TZ=${TZ}
11+
RUN mkdir -p /var/lib/postgresql/data && \
12+
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
13+
echo $TZ > /etc/timezone && \
14+
chown -R postgres:root /var/lib/postgresql/data
1215

1316
COPY pg.cnf /etc/postgresql/conf.d/pg.cnf
1417

0 commit comments

Comments
 (0)