8000 Dockerfile to project top dir · m99coder/postgres_cluster@567f98f · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 567f98f

Browse files
committed
Dockerfile to project top dir
1 parent 960778f commit 567f98f

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*/*/.git
2+
.git
3+
.vscode

Dockerfile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# vim:set ft=dockerfile:
2+
FROM debian:jessie
3+
4+
# explicitly set user/group IDs
5+
RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres
6+
7+
# make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default
8+
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
9+
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
10+
ENV LANG en_US.utf8
11+
12+
# postgres build deps
13+
RUN apt-get update && apt-get install -y \
14+
git \
15+
make \
16+
gcc \
17< EFFF code class="diff-text syntax-highlighted-line addition">+
gdb \
18+
libreadline-dev \
19+
bison \
20+
flex \
21+
zlib1g-dev \
22+
sudo \
23+
&& rm -rf /var/lib/apt/lists/*
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+
30+
COPY ./ /pg/src
31+
RUN chown -R postgres:postgres /pg/src
32+
33+
USER postgres
34+
ENV CFLAGS -O0
35+
WORKDIR /pg
36+
37+
RUN cd /pg/src && \
38+
ls -la && \
39+
whoami && \
40+
./configure --enable-cassert --enable-debug --prefix=/pg/install && \
41+
make -j 4 install
42+
43+
ENV PATH /pg/install/bin:$PATH
44+
ENV PGDATA /pg/data
45+
46+
RUN cd /pg/src/contrib/mmts && make clean && make install
47+
48+
ENTRYPOINT ["/pg/src/contrib/mmts/tests2/docker-entrypoint.sh"]
49+
50+
EXPOSE 5432
51+
CMD ["postgres"]

0 commit comments

Comments
 (0)
0