79 lines
2.3 KiB
Docker
79 lines
2.3 KiB
Docker
FROM ubuntu:18.04
|
|
|
|
# Installing dependencies
|
|
RUN apt update
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt install -y qtbase5-dev openssl libmbedtls-dev tesseract-ocr tesseract-ocr-rus libopencv-dev libzbar-dev qttools5-dev nlohmann-json-dev libcurl4-openssl-dev libtesseract-dev libqrencode-dev
|
|
RUN DEBIAN_FRONTEND=noninteractive apt install -y wget git cmake make gcc g++ fuse
|
|
|
|
# For gcc 12
|
|
RUN DEBIAN_FRONTEND=noninteractive apt install -y libmpc-dev libmpfr-dev libgmp-dev
|
|
|
|
# The program uses std::regex_constants::multiline and some other C++17 things that are not found in gcc for Ubuntu Focal. Thus, we should compile it.
|
|
|
|
WORKDIR /
|
|
|
|
#RUN wget https://mirror.linux-ia64.org/gnu/gcc/releases/gcc-12.3.0/gcc-12.3.0.tar.gz
|
|
RUN wget https://mirror.linux-ia64.org/gnu/gcc/releases/gcc-13.3.0/gcc-13.3.0.tar.gz
|
|
RUN tar xf gcc-13.3.0.tar.gz
|
|
|
|
RUN rm gcc-13.3.0.tar.gz
|
|
|
|
WORKDIR /gcc-13.3.0
|
|
RUN ./configure --disable-multilib --prefix=/usr
|
|
RUN make -j $(nproc) && make install
|
|
|
|
RUN cp /usr/lib64/* /usr/lib/x86_64-linux-gnu || :
|
|
|
|
WORKDIR /
|
|
RUN rm -rf gcc-13.3.0
|
|
|
|
# Download linuxdeployqt
|
|
RUN wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage -O /usr/bin/linuxdeployqt && \
|
|
chmod +x /usr/bin/linuxdeployqt
|
|
|
|
# Prepare AppDir and its files
|
|
WORKDIR /appimage
|
|
RUN mkdir -p AppDir
|
|
|
|
COPY deploy/appimage/checks-parser.desktop AppDir
|
|
COPY assets/icons/icon.png AppDir/checks-parser.png
|
|
COPY deploy/appimage/AppRun AppDir
|
|
RUN chmod +x AppDir/AppRun
|
|
|
|
#Copy only necessities
|
|
COPY assets ./assets
|
|
COPY check ./check
|
|
COPY exceptions ./exceptions
|
|
COPY goods ./goods
|
|
COPY image ./image
|
|
COPY image_redactor ./image_redactor
|
|
COPY output ./output
|
|
COPY parser ./parser
|
|
COPY settings ./settings
|
|
COPY scenes ./scenes
|
|
COPY net ./net
|
|
COPY translations ./translations
|
|
COPY http_server ./http_server
|
|
COPY utils ./utils
|
|
|
|
COPY ./*.h ./*cpp ./*.ui ./*.qrc CMakeLists.txt .
|
|
|
|
RUN mkdir build
|
|
WORKDIR /appimage/build
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt install -y libboost-regex-dev
|
|
|
|
RUN cmake -DBUILD_TRANSLATIONS=on .. && make -j 8
|
|
|
|
WORKDIR /appimage/AppDir/usr/bin
|
|
|
|
RUN cp /appimage/build/checks-parser .
|
|
|
|
WORKDIR /appimage
|
|
|
|
RUN PATH=/usr/lib/qt5/bin/:$PATH linuxdeployqt --appimage-extract-and-run AppDir/usr/bin/checks-parser -no-copy-copyright-files -appimage
|
|
|
|
RUN mkdir -p /output
|
|
ENTRYPOINT ["cp", "Checks_parser-x86_64.AppImage", "/output"]
|