FROM ubuntu:18.04

# Installing dependencies
RUN apt update

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

#Copy only necessities
COPY assets ./assets
COPY check ./check
COPY exceptions ./exceptions
COPY goods ./goods
COPY image_redactor ./image_redactor
COPY output ./output
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 .

WORKDIR /app/build

RUN cmake -DBUILD_TRANSLATIONS=on .. && make -j 8

ENTRYPOINT ["bash"]