File tree 2 files changed +9
-2
lines changed
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 \
18
18
libreadline-dev \
19
19
bison \
20
20
flex \
21
- zlib1g-dev \
21
+ zlib1g-dev \
22
+ sudo \
22
23
&& rm -rf /var/lib/apt/lists/*
23
24
24
25
RUN 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
+
25
30
USER postgres
26
31
ENV CFLAGS -O0
27
32
WORKDIR /pg
@@ -34,7 +39,7 @@ RUN cd /pg && \
34
39
35
40
ENV PATH /pg/install/bin:$PATH
36
41
ENV PGDATA /pg/data
37
- RUN mkdir PGDATA
42
+
38
43
39
44
# Here we can insert some ENV var to invalidate subsequent layers
40
45
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ if [ "${1:0:1}" = '-' ]; then
6
6
set -- postgres " $@ "
7
7
fi
8
8
9
+ sudo sh -c ' echo "/pg/%p.%s.%c.%P.core" > /proc/sys/kernel/core_pattern'
10
+
9
11
if [ " $1 " = ' postgres' ]; then
10
12
mkdir -p " $PGDATA "
11
13
chmod 700 " $PGDATA "
You can’t perform that action at this time.
0 commit comments