deployment
This commit is contained in:
71
deploy/appimage/Dockerfile
Normal file
71
deploy/appimage/Dockerfile
Normal file
@@ -0,0 +1,71 @@
|
||||
FROM ubuntu:20.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-json3-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 tar xf gcc-12.3.0.tar.gz
|
||||
|
||||
WORKDIR /gcc-12.3.0
|
||||
RUN ./configure --disable-multilib
|
||||
RUN make -j $(nproc) && make install
|
||||
|
||||
WORKDIR /
|
||||
RUN rm -rf gcc-12.3.0
|
||||
|
||||
ENTRYPOINT bash
|
||||
|
||||
# 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 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 utils ./utils
|
||||
|
||||
COPY ./*cpp ./*.h ./*.ui ./*.qrc CMakeLists.txt .
|
||||
|
||||
RUN mkdir build
|
||||
WORKDIR /appimage/build
|
||||
|
||||
RUN cmake -DBUILD_TRANSLATIONS=on .. && make -j 8
|
||||
|
||||
WORKDIR /appimage/AppDir/usr/bin
|
||||
|
||||
RUN cp /appimage/build/checks-parser .
|
||||
|
||||
WORKDIR /appimage
|
||||
|
||||
RUN LD_LIBRARY_PATH=LD_LIBRARY_PATH=/usr/local/lib64 linuxdeployqt AppDir/usr/bin/checks-parser -no-copy-copyright-files -appimage
|
||||
|
||||
ENTRYPOINT bash
|
||||
Reference in New Issue
Block a user