From 213050c3b7918b2020f31504156da641aa21d11d Mon Sep 17 00:00:00 2001 From: Arnd Date: Tue, 28 Jan 2020 22:45:07 +0100 Subject: [PATCH] Add Dockerfile for Windows --- Dockerfile | 17 ----------------- Dockerfile.linux | 11 +++++++++++ Dockerfile.win | 9 +++++++++ README.md | 12 ++++-------- 4 files changed, 24 insertions(+), 25 deletions(-) delete mode 100644 Dockerfile create mode 100644 Dockerfile.linux create mode 100644 Dockerfile.win diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 93c6c4d..0000000 --- a/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM therecipe/qt:linux_debian_9 AS qt - -RUN apt-get update -RUN apt-get -y install git - -WORKDIR /home/user/work/src/github.com/cfanatic/ -RUN git clone https://github.com/cfanatic/go-expense.git -RUN git clone https://github.com/cfanatic/go-expensegui.git -RUN go get github.com/360EntSecGroup-Skylar/excelize -RUN go get github.com/gonum/stat -RUN go get github.com/ryanuber/columnize -RUN go get github.com/wcharczuk/go-chart -RUN go get go.mongodb.org/mongo-driver/bson - -ENV QT_MXE_ARCH=amd64 -RUN qtmoc desktop go-expensegui -RUN qtdeploy build desktop github.com/cfanatic/go-expensegui diff --git a/Dockerfile.linux b/Dockerfile.linux new file mode 100644 index 0000000..308646f --- /dev/null +++ b/Dockerfile.linux @@ -0,0 +1,11 @@ +FROM therecipe/qt:linux_debian_9 AS qt + +RUN apt-get update +RUN apt-get -y install git + +WORKDIR /home/user/work/src/github.com/cfanatic/ +RUN go get -v -d github.com/cfanatic/go-expensegui + +ENV QT_MXE_ARCH=amd64 +RUN qtmoc desktop go-expensegui +RUN qtdeploy build desktop github.com/cfanatic/go-expensegui diff --git a/Dockerfile.win b/Dockerfile.win new file mode 100644 index 0000000..753a263 --- /dev/null +++ b/Dockerfile.win @@ -0,0 +1,9 @@ +FROM therecipe/qt:windows_64_static as qt + +RUN apt-get update +RUN apt-get -y install git + +WORKDIR /home/user/work/src/github.com/cfanatic/ +RUN go get -v -d github.com/cfanatic/go-expensegui + +RUN qtdeploy build windows github.com/cfanatic/go-expensegui diff --git a/README.md b/README.md index 12f8aa5..29f9ae1 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It helps you analyze your monthly and yearly expenses by giving answers to follo 4. Where are potentials to reduce costs? The graphical user interface shall simplify the process of importing and labeling account statement transactions. -Labeling is done in automatic fashion whenever a similar transaction can be found in the database. +Labeling is done in automatic fashion whenever a similar transaction is found in the database. Three sample account statements can be found in folder `res/`. @@ -37,7 +37,7 @@ go build ```bash docker pull therecipe/qt:linux_debian_9 -docker build -t expensegui:latest -f Dockerfile . +docker build -t expensegui:latest -f Dockerfile.linux . docker run --name expensegui expensegui:latest docker cp expensegui:/home/user/work/src/github.com/cfanatic/go-expensegui/deploy/linux/go-expensegui . ``` @@ -46,7 +46,7 @@ docker cp expensegui:/home/user/work/src/github.com/cfanatic/go-expensegui/deplo ```bash docker pull therecipe/qt:windows_64_static -docker build -t expensegui:latest -f Dockerfile . +docker build -t expensegui:latest -f Dockerfile.win . docker run --name expensegui expensegui:latest docker cp expensegui:/home/user/work/src/github.com/cfanatic/go-expensegui/deploy/windows/go-expensegui.exe . ``` @@ -60,11 +60,7 @@ docker pull mongo:latest docker run -d -p 27017:27017 --name expenses mongo:latest ``` -Run the program: - -```bash -./go-expensegui -``` +Run the program. Import each account statement and specify cost type labels for all transactions: