# ##############################################
# Dockerfile for building BNC on debian with Qt5
# ##############################################
# Usage: docker/podman build -t bnc:2.13 .
FROM debian:buster-slim
#FROM ubuntu:20.10

LABEL maintainer="igs-ip@bkg.bund.de"
LABEL version="2.13"

RUN apt update && apt upgrade -y
RUN apt install -y build-essential libssl-dev
RUN apt install -y qtbase5-dev libqt5svg5-dev

COPY bnc_plugin.pro bnc.pro /tmp/BNC/
COPY newmat /tmp/BNC/newmat/
COPY qwt /tmp/BNC/qwt/
COPY qwtpolar /tmp/BNC/qwtpolar/
COPY src /tmp/BNC/src/

# Build
WORKDIR /tmp/BNC
RUN qmake -qt=5 bnc.pro && make

# Print version
RUN echo '/tmp/BNC/bnc created'
RUN ./bnc --version
#RUN cat /etc/*release && gcc --version && qmake -qt=5 --version