# ONLY FOR DEVELOPMENT PURPOSES # dockerfile is not suitable to produce a production-grade docker image FROM ruby:2.6.3-buster WORKDIR /opt/app # Versioned dependencies ENV FREETDS_VER 1.1.20 ENV TDSVER 7.1 ENV NODE_VER 12.x ENV POSTGRES_VER 11 # Other useful env variables to set ENV BUNDLE_PATH /bundle_box/bundle ENV GEM_HOME /bundle_box/bundle ENV PATH /bundle_box/bundle/bin:$PATH # Install several necessary packages and add Postgres repo key RUN apt-get update && apt-get install -y -qq software-properties-common apt-transport-https # Add Debian Buster postgres keychain for verification to download psql client RUN \ echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - &&\ apt-get update # Install several more packages RUN \ apt-get install -qq -y --no-install-recommends \ build-essential libpq-dev curl unixodbc unixodbc-dev freetds-dev \ freetds-bin tdsodbc postgresql-client-${POSTGRES_VER} xvfb imagemagick \ netcat-openbsd vim libc6-dev # Install FreeTDS RUN wget https://www.freetds.org/files/stable/freetds-"${FREETDS_VER}".tar.gz && \ tar -xzf freetds-"${FREETDS_VER}".tar.gz && \ rm freetds-"${FREETDS_VER}".tar.gz && \ cd freetds-"${FREETDS_VER}" && \ ./configure --prefix=/usr/local --with-tdsver=${TDSVER} && \ make && \ make install && \ make clean # Install Nodejs RUN export VERSION="node_${NODE_VER}" DISTRO="$(lsb_release -s -c)" && \ curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list && \ echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list && \ apt-get -o Acquire::Check-Valid-Until=false update && \ apt-get install -qq -y --no-install-recommends nodejs # Install chrome for integration tests RUN curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ && dpkg -i google-chrome.deb || true \ && apt-get install -f -y \ && sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome \ && rm google-chrome.deb RUN gem update --system