diff --git a/deploy/appimage/Dockerfile b/deploy/appimage/Dockerfile index aff7365..e630dcc 100644 --- a/deploy/appimage/Dockerfile +++ b/deploy/appimage/Dockerfile @@ -3,6 +3,9 @@ FROM checks_parser_base_ubuntu RUN DEBIAN_FRONTEND=noninteractive apt update RUN DEBIAN_FRONTEND=noninteractive apt install -y wget git cmake make gcc g++ fuse libboost-regex-dev +ARG pkgname=$name +ARG pkgver=$version +ARG revision WORKDIR / @@ -23,4 +26,6 @@ RUN cp build/checks-parser /app/AppDir/usr/bin 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"] +RUN echo "cp Checks_parser-x86_64.AppImage /output/Checks_parser-x86_64_${pkgver}-${revision}.AppImage" > /deploy.sh +RUN chmod +x /deploy.sh +ENTRYPOINT ["bash", "/deploy.sh"] diff --git a/deploy/appimage/deploy.sh b/deploy/appimage/deploy.sh deleted file mode 100755 index 6a9642d..0000000 --- a/deploy/appimage/deploy.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -rm -rf AppDir - -mkdir -p AppDir -mkdir -p AppDir/usr/bin -mkdir -p AppDir/usr/lib -mkdir -p AppDir/usr/share/tesseract-ocr/4.00/tessdata -cp -r /usr/share/tesseract-ocr/4.00/tessdata/* AppDir/usr/share/tesseract-ocr/4.00/tessdata -cp ../../checks-parser AppDir/usr/bin - -echo \ -"[Desktop Entry] -Name=Checks parser -Exec=usr/bin/checks-parser -Icon=checks-parser -Type=Application -Categories=Utility;" \ -> AppDir/checks-parser.desktop - -echo \ -"#!/bin/bash -export TESSDATA_PREFIX=\$APPDIR/usr/share/tesseract-ocr/4.00/tessdata - -\$APPDIR/usr/bin/checks-parser" \ -> AppDir/AppRun - -cp ../../icon.png AppDir/checks-parser.png - -chmod +x AppDir/AppRun -cp ../../checks-parser AppDir/usr/bin -linuxdeployqt AppDir/usr/bin/checks-parser -no-copy-copyright-files -appimage diff --git a/deploy/base-docker/ubuntu/Dockerfile b/deploy/base-docker/ubuntu/Dockerfile index ed40002..3235e01 100644 --- a/deploy/base-docker/ubuntu/Dockerfile +++ b/deploy/base-docker/ubuntu/Dockerfile @@ -3,7 +3,7 @@ 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 qtbase5-dev openssl libmbedtls-dev libopencv-dev libzbar-dev qttools5-dev nlohmann-json-dev libcurl4-openssl-dev libqrencode-dev RUN DEBIAN_FRONTEND=noninteractive apt install -y wget git cmake make gcc g++ fuse libboost-regex-dev WORKDIR /app @@ -13,10 +13,8 @@ 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 diff --git a/deploy/debian/Dockerfile b/deploy/debian/Dockerfile index d36c7dd..f9e1536 100644 --- a/deploy/debian/Dockerfile +++ b/deploy/debian/Dockerfile @@ -3,9 +3,9 @@ FROM checks_parser_base_ubuntu #for envsubst RUN DEBIAN_FRONTEND=noninteractive apt install -y gettext -ARG pkgname=checks-parser -ARG pkgver=1.0 -ARG revision=1 +ARG pkgname=$name +ARG pkgver=$version +ARG revision ARG pkg=${pkgname}_$pkgver-$revision diff --git a/docker-compose.yml b/docker-compose.yml index f39c1d3..74274d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,18 +6,28 @@ services: dockerfile: deploy/base-docker/ubuntu/Dockerfile appimage: image: checks_parser_appimage:latest + env_file: .env build: dockerfile: deploy/appimage/Dockerfile context: . + args: + - pkgname=$name + - pkgver=$version + - revision=$revision volumes: - ./binaries:/output depends_on: - base_ubuntu debian: image: checks_parser_debian:latest + env_file: .env build: dockerfile: deploy/debian/Dockerfile context: . + args: + - pkgname=$name + - pkgver=$version + - revision=$revision volumes: - ./binaries:/output depends_on: