Created
October 24, 2020 06:00
-
-
Save minskmaz/65faa2dad734dae194dce38eb31e3d43 to your computer and use it in GitHub Desktop.
Dockerfile for compiling tds-fdw postgres extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
WORKDIR / | |
RUN apt update | |
RUN apt -y upgrade | |
RUN apt-get update | |
RUN apt-get install -y lsb-release && apt-get clean all | |
RUN apt -y install gnupg1 | |
RUN apt-get install -y libsybdb5 freetds-dev freetds-common | |
RUN bash -c 'source /etc/os-release; echo "deb http://apt.postgresql.org/pub/repos/apt/ ${VERSION_CODENAME}-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | |
RUN apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-keys 0xACCC4CF8 | |
RUN apt-get update | |
RUN apt-get upgrade | |
RUN apt-get install -y postgresql-12 postgresql-client-12 postgresql-server-dev-12 | |
RUN apt-get install -y postgis | |
RUN dpkg -l | grep postgres | |
RUN apt-get update | |
RUN apt-get install -y build-essential | |
RUN apt-get install -y gnupg gcc make | |
RUN apt-get install -y git-core | |
RUN git clone https://github.com/tds-fdw/tds_fdw.git | |
WORKDIR /tds_fdw | |
RUN PATH=/usr/lib/postgresql/12/bin/:$PATH USE_PGXS=1 make | |
RUN PATH=/usr/lib/postgresql/12/bin/:$PATH USE_PGXS=1 make install | |
WORKDIR / | |
RUN if [ -n "$tempDir" ]; then \ | |
# if we have leftovers from building, let's purge them (including #extra, unnecessary build deps) | |
apt-get purge -y --auto-remove; \ | |
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ | |
fi; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment