Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
build: change base centos:7 => debian:9 , dropping pgxc_ctl
Browse files Browse the repository at this point in the history
As noted in the README for a couple of years, pgxc_ctl is no longer the
recommended way of using Postgres-XL Docker. In this build upgrade, it's
no longer compiled or included in the image, either.
  • Loading branch information
tiredpixel committed Jun 20, 2019
1 parent 5452509 commit 1858d36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 36 deletions.
46 changes: 14 additions & 32 deletions Dockerfile
@@ -1,57 +1,39 @@
#===============================================================================
FROM centos:7

MAINTAINER tiredpixel <tiredpixel@posteo.de>
FROM debian:9

ARG PG_HOME=/var/lib/postgresql
ARG PG_LIB=/usr/local/lib/postgresql
ARG PG_USER=postgres
ARG PG_USER_HEALTHCHECK=_healthcheck
#-------------------------------------------------------------------------------
RUN yum -y install \
automake \
RUN apt-get update && \
apt-get install -y \
bison \
build-essential \
daemontools \
flex \
gcc \
gcc-c++ \
git \
kernel-devel \
make \
readline-devel \
zlib-devel \
&& \
yum clean all
libreadline-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*

RUN useradd ${PG_USER} -d ${PG_HOME} \
&& \
mkdir -p ${PG_LIB} ${PG_HOME} \
&& \
RUN useradd ${PG_USER} -d ${PG_HOME} && \
mkdir -p ${PG_LIB} ${PG_HOME} && \
chown -R ${PG_USER}:${PG_USER} ${PG_LIB} ${PG_HOME}

#-------------------------------------------------------------------------------
WORKDIR ${PG_HOME}

COPY lib/ ./lib/
RUN chown -R ${PG_USER}:${PG_USER} ${PG_HOME}
COPY --chown=postgres:postgres lib/ ./lib/
#-------------------------------------------------------------------------------
USER ${PG_USER}

WORKDIR ${PG_HOME}/lib/postgres-xl

RUN ./configure --prefix ${PG_LIB} \
&& \
make \
&& \
cd contrib/pgxc_ctl \
&& \
RUN ./configure --prefix ${PG_LIB} && \
make
#-------------------------------------------------------------------------------
USER root

RUN make install \
&& \
cd contrib/pgxc_ctl \
&& \
make install
RUN make install
#-------------------------------------------------------------------------------
USER ${PG_USER}

Expand Down
5 changes: 1 addition & 4 deletions README.md
Expand Up @@ -13,10 +13,7 @@ Previously, Postgres-XL Docker used pgxc_ctl for initialisation and control,
running SSH servers as well as database services. This has now been completely
redesigned to run database services directly without SSH, initialising using
included helper scripts, and allowing full flexibility with regard to cluster
topologies.

The pgxc_ctl binary continues to be compiled and provided in the image in case
people find it useful, but this might change in the future, since the up-to-date
topologies. The pgxc_ctl binary is no longer included in the image, since the
recommended Postgres-XL Docker workflow is to *not* use it.


Expand Down

0 comments on commit 1858d36

Please sign in to comment.