File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,15 @@ RUN apt-get update && apt-get install -y \
1818 libreadline-dev \
1919 bison \
2020 flex \
21- zlib1g-dev \
21+ zlib1g-dev \
22+ sudo \
2223 && rm -rf /var/lib/apt/lists/*
2324
2425RUN mkdir /pg && chown postgres:postgres /pg
26+ # We need that to allow editing of /proc/sys/kernel/core_pattern
27+ # from docker-entrypoint.sh
28+ RUN echo "postgres ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers
29+
2530USER postgres
2631ENV CFLAGS -O0
2732WORKDIR /pg
@@ -34,7 +39,7 @@ RUN cd /pg && \
3439
3540ENV PATH /pg/install/bin:$PATH
3641ENV PGDATA /pg/data
37- RUN mkdir PGDATA
42+
3843
3944# Here we can insert some ENV var to invalidate subsequent layers
4045
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ if [ "${1:0:1}" = '-' ]; then
66 set -- postgres " $@ "
77fi
88
9+ sudo sh -c ' echo "/pg/%p.%s.%c.%P.core" > /proc/sys/kernel/core_pattern'
10+
911if [ " $1 " = ' postgres' ]; then
1012 mkdir -p " $PGDATA "
1113 chmod 700 " $PGDATA "
You can’t perform that action at this time.
0 commit comments