diff --git a/supplemental/docker/Dockerfile_prod b/supplemental/docker/Dockerfile_prod index 742f6dc..901c243 100644 --- a/supplemental/docker/Dockerfile_prod +++ b/supplemental/docker/Dockerfile_prod @@ -4,15 +4,9 @@ LABEL maintainer="ivan.kuchin@gmail.com" LABEL org.opencontainers.image.source="https://github.com/IvanKuchin/__BUILD_REPO__" # following two commands suppose to be reused from cache -RUN apt update && apt install --no-install-recommends --no-install-suggests -y git ca-certificates locales +RUN apt update && apt install --no-install-recommends --no-install-suggests -y git ca-certificates -############################## -# install additional locales # -############################## -locale-gen en_US.UTF8 -locale-gen ru_RU.UTF8 -update-locale LC_ALL=en_US.UTF8 -source /etc/default/locale +# COPY --from=libwebsocket /usr/local/share/libwebsockets/ /usr/local/share/libwebsockets/ RUN git clone --depth 1 https://github.com/IvanKuchin/__BUILD_REPO__.git /backend WORKDIR /backend @@ -21,26 +15,57 @@ RUN apt-get install --no-install-recommends --no-install-suggests -y software-pr RUN add-apt-repository -y ppa:jonathonf/ffmpeg-4 RUN apt update RUN apt-get install --no-install-recommends --no-install-suggests -y \ - build-essential \ - cmake \ - ffmpeg \ - graphicsmagick-libmagick-dev-compat \ - libavcodec-dev \ - libavformat-dev \ - libavutil-dev \ - libcurl4-openssl-dev \ - libgraphicsmagick++-dev \ - libhpdf-dev \ - libmaxminddb-dev \ - libmysqlclient-dev \ - libssl-dev \ - libwebp-dev \ - pkg-config + build-essential \ + cmake \ + ffmpeg \ + graphicsmagick-libmagick-dev-compat \ + libavcodec-dev \ + libavformat-dev \ + libavutil-dev \ + libcurl4-openssl-dev \ + libgraphicsmagick++-dev \ + libhpdf-dev \ + libmaxminddb-dev \ + libmysqlclient-dev \ + libssl-dev \ + libwebp-dev \ + libarchive-dev \ + rapidjson-dev \ + pkg-config +##################### +# locale generation # +##################### +RUN apt-get install --no-install-recommends --no-install-suggests -y locales +RUN locale-gen ru_RU.utf8 +RUN locale-gen en_US.utf8 +RUN update-locale +RUN export LC_ALL=en_US.utf8 + +############################# +# libwkhtmltox installation # +############################# +RUN apt-get install --no-install-recommends --no-install-suggests -y wget +RUN wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_amd64.deb +RUN dpkg -i wkhtmltox_0.12.5-1.trusty_amd64.deb || true # trick to force dpkg return successfull return code +RUN apt install -f --no-install-recommends --no-install-suggests -y + +################## +# save commit id # +################## RUN git rev-parse HEAD > ./supplemental/git/git_commit_id + +##################### +# build from source # +##################### RUN mkdir build RUN cd build && cmake .. && make -j4 && make install +################ +# run QA tests # +################ +# RUN cd build && ctest --output-on-failure + ################################ ## DB is a separate container ## ################################ @@ -62,4 +87,4 @@ RUN cd build && cmake .. && make -j4 && make install STOPSIGNAL SIGTERM -# CMD ["/root/my_script.sh"] +# CMD ["ctest"]