Skip to content

Instantly share code, notes, and snippets.

@gourytch
Last active January 22, 2021 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gourytch/e115930058edaa1eea0fb8458e2202c7 to your computer and use it in GitHub Desktop.
Save gourytch/e115930058edaa1eea0fb8458e2202c7 to your computer and use it in GitHub Desktop.
build pgmodeller to the /opt/pgmodeler directory
ARG CODENAME=focal
ARG INSTALLATION_ROOT="/opt/pgmodeler"
FROM ubuntu:${CODENAME} as build
ARG CODENAME
ARG INSTALLATION_ROOT
ENV CODENAME="${CODENAME}"
ENV INSTALLATION_ROOT="/opt/pgmodeler"
ENV QT_ROOT="/usr"
ENV PGMODELER_SOURCE="/tmp/pgmodeler"
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y \
git \
build-essential \
pkg-config \
libxml2-dev \
qt5-qmake \
qt5-default \
libqt5svg5-dev \
libpq-dev
WORKDIR /tmp
RUN mkdir -p $(dirname ${PGMODELER_SOURCE}) \
&& git clone \
--depth 1 \
--branch master \
https://github.com/pgmodeler/pgmodeler.git \
"${PGMODELER_SOURCE}"
# && git clone \
# --depth 1 \
# --branch master \
# https://github.com/pgmodeler/plugins.git \
# "${PGMODELER_SOURCE}"/plugins
WORKDIR ${PGMODELER_SOURCE}
RUN ${QT_ROOT}/bin/qmake -r \
"CONFIG+=release" \
"PREFIX=${INSTALLATION_ROOT}" \
"BINDIR=${INSTALLATION_ROOT}" \
"PRIVATEBINDIR=${INSTALLATION_ROOT}" \
"PRIVATELIBDIR=${INSTALLATION_ROOT}/lib" \
pgmodeler.pro \
&& make -j $(nproc) \
&& make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment