Fakturama als Docke...
 
Benachrichtigungen
Alles entfernen

Fakturama als Docker Container

6 Beiträge
1 Benutzer
0 Reactions
2,693 Aufrufe
(@buchhalterfa)
Estimable Member
Beigetreten: vor 8 Jahren
Beiträge: 231

   
Zitat
(@buchhalterfa)
Estimable Member
Beigetreten: vor 8 Jahren
Beiträge: 231
Topic starter  

Fakturama 1.x.x

https://sourceforge.net/projects/fakturama/

Fakturama 2.x.x

https://bitbucket.org/fakturamadev/fakturama-2

Beispiel: freecad Desktop
https://hub.docker.com/r/izone/freecad/

Der dockerfile von freecad, das sollte bei Fakturama erheblich einfacher ausfallen:

FROM izone/freecad:nvidia-xenial MAINTAINER Leonardo Loures  ## References: #  https://gist.github.com/berndhahnebach/38d5bfe73134928c0a1ad001a94df05f  #  https://github.com/berndhahnebach/Netgen  #  https://sourceforge.net/p/netgen-mesher/wiki/Home/  #  https://aur.archlinux.org/packages  #  http://www.boost.org/doc/libs/1_64_0/more/getting_started/unix-variants.html  ENV FREECAD=/opt/FreeCAD RUN 
mkdir -p $FREECAD 
 
	&& pack_dev=" 
		doxygen 
		libpyside-dev 
		libqtcore4 
		libshiboken-dev 
		libxerces-c-dev 
		libxmu-dev 
		libxmu-headers 
		libxmu6 
		libxmuu-dev 
		libxmuu1 
		libqtwebkit-dev 
		pyside-tools 
		python-pivy 
		python-pyside 
		python-matplotlib 
		swig " 
 
	&& libBoost_dev=" 
		libboost-filesystem1.58-dev 
		libboost-program-options1.58-dev 
		libboost-python1.58-dev 
		libboost-regex1.58-dev 
		libboost-signals1.58-dev 
		libboost-system1.58-dev 
		libboost-thread1.58-dev " 
 
	&& pack_tools=" 
		automake 
		dictionaries-common 
		git 
		wget 
		g++ 
		tcl8.5-dev 
		tk8.5-dev 
		libcoin80-dev 
		libhdf5-dev 
		libfreetype6-dev 
		python-dev 
		qt4-dev-tools 
		qt4-qmake " 
 
	&& pack_netgen=" 
		openmpi-bin 
		libopenmpi-dev 
		libtogl-dev " 
 
	&& pack_occt=" 
		libfreeimage-dev 
		libtbb-dev " 
 
	&& pack_calculix=" 
		gfortran 
		cpio " 
 
	&& apt-get update 
	&& apt-get install -y 
		$pack_dev 
$libBoost_dev 
		$pack_tools 
$pack_netgen 
		$pack_occt 
$pack_calculix 
		cmake 
 
 ### libMED 3.2.0
 #----------------
	&& MAKEDIR=med 
	&& cd 
	&& mkdir $MAKEDIR 
&& cd $MAKEDIR 
	&& git clone  https://github.com/luvres/libMED.git  
 
 # building MED
	&& mkdir build 
	&& cd build 
 
	&& cmake ../libMED 
		-DCMAKE_INSTALL_PREFIX:PATH=$FREECAD 

&& make -j$(nproc) 
	&& make install 
 # Clean
	&& cd && rm $MAKEDIR -fR 

### OCCT 7.1.0p1 -> libfreeimage-dev libfreeimage3 libtbb-dev libtbb2 #---------------- && MAKEDIR=occt 
&& cd 
&& mkdir $MAKEDIR 
	&& cd $MAKEDIR 
&& git clone  https://github.com/luvres/occt71.git  
&& mkdir build 
&& cd build 

&& cmake 
../occt71 
-DCMAKE_INSTALL_PREFIX:PATH=$FREECAD 
		-DUSE_VTK:BOOL=OFF 
		-DUSE_TBB:BOOL=ON 
		-DUSE_FREEIMAGE:BOOL=ON 
		-DCMAKE_BUILD_TYPE=Release 
 
	&& make -j$(nproc) 
&& make install 

# Clean && cd && rm $MAKEDIR -fR 
 
 ### Netgen 5.3.1
 #----------------
	&& cd 
	&& git clone  https://github.com/luvres/netgen.git  
	&& cd netgen 
 
	# building Netgen
	&& ./configure 
		--prefix=$FREECAD 
--enable-occ 
--with-occ=$FREECAD 
		--with-tcl=/usr/lib/tcl8.5 
		--with-tk=/usr/lib/tk8.5 
		--with-togl=/usr/lib/ 
		--enable-shared 
		--enable-nglib 
		--disable-gui 
		--disable-dependency-tracking 
		CXXFLAGS="-DNGLIB_EXPORTS -std=gnu++11" 
 
	&& make -j$(nproc) 
&& make install 

&& cp -fR libsrc $FREECAD/libsrc 
 
 # Clean
	&& cd && rm netgen -fR 
 
 ### Eigen 3.3.4
 #---------------
 #  http://eigen.tuxfamily.org/index.php?title=Main_Page 
	&& eigen_VERSION=3.3.4 
 
	&& MAKEDIR=eigen 
	&& cd 
	&& mkdir $MAKEDIR 
&& cd $MAKEDIR 
	&& wget -c  http://bitbucket.org/eigen/eigen/get/${eigen_VERSION}.tar.gz  
&& tar zxf ${eigen_VERSION}.tar.gz 
	&& rm ${eigen_VERSION}.tar.gz 
&& mv eigen-* eigen-${eigen_VERSION} 
	&& mkdir build 
	&& cd build 
 
 && cmake ../eigen-${eigen_VERSION} 
-DCMAKE_INSTALL_PREFIX=$FREECAD 
 -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG 
 -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG 
 -DCMAKE_BUILD_TYPE=Release 
 -DCMAKE_VERBOSE_MAKEFILE=ON 
 
 && make install 
 # Clean
	&& cd && rm $MAKEDIR -fR 

### VTK 8.1.0 #------------- && vtk_VERSION_MAJOR=8.1 
&& vtk_VERSION_MINOR=8.1.0 

&& MAKEDIR=vtk 
&& cd 
&& mkdir $MAKEDIR 
	&& cd $MAKEDIR 
&& wget  http://www.vtk.org/files/release/${vtk_VERSION_MAJOR}/VTK-${vtk_VERSION_MINOR}.tar.gz  
&& gunzip VTK-${vtk_VERSION_MINOR}.tar.gz 
	&& tar xf VTK-${vtk_VERSION_MINOR}.tar 
&& rm VTK-${vtk_VERSION_MINOR}.tar 
 # building VTK
	&& mkdir build 
	&& cd build 
 
	&& cmake ../VTK-${vtk_VERSION_MINOR} 
-DCMAKE_INSTALL_PREFIX:PATH=$FREECAD 
			-DVTK_Group_Rendering:BOOL=OFF 
			-DVTK_Group_StandAlone:BOOL=ON 
			-DVTK_RENDERING_BACKEND=None 
 
	&& make -j$(nproc) 
&& make install 
# Clean && cd && rm $MAKEDIR -fR 
 
 ### FreeCAD latest Github commit
 #--------------------------------
 # get FreeCAD
	&& cd 
	&& git clone  https://github.com/FreeCAD/FreeCAD  
 
 # building FreeCAD
	&& cd 
	&& mkdir build 
	&& cd build 
 
	&& cmake ../FreeCAD 
			-DCMAKE_INSTALL_PREFIX:PATH=$FREECAD 
-DOCC_INCLUDE_DIR=$FREECAD/include/opencascade 
			-DNETGEN_ROOT=$FREECAD 
-DBUILD_FEM_NETGEN=ON 

# Make FreeCAD && cd 
&& cd build 
&& make -j$(nproc) 
 
 # Install FreeCAD
	&& cd 
	&& cd build 
	&& make install 
	&& ln -s /opt/FreeCAD/bin/FreeCAD /usr/bin/freecad-git 
 # Clean
	&& cd && rm -fR 
		FreeCAD/ build/ 
	 # 79M
		$FREECAD/doc/* 
# 128M $FREECAD/share/doc/* 
 
 ### Calculix 2.13 and CGX
 #-------------------------
	&& ccx_VERSION=2.13 
 
	&& cd 
	&& git clone  https://github.com/luvres/calculix.git  
	&& cd calculix/ 
	&& ./install 
	&& cp $HOME/CalculiX-${ccx_VERSION}/bin/ccx_${ccx_VERSION} /usr/bin/ccx 
&& cp $HOME/CalculiX-${ccx_VERSION}/bin/cgx /usr/bin/cgx 
# Clean && cd && rm CalculiX-${ccx_VERSION} calculix -fR 
 
 ## Clean All
	&& strip 
		$FREECAD/lib/*.? 
$FREECAD/lib/*.so 
#		/usr/bin/ccx /usr/bin/cgx 
 
	&& apt-get remove -y 
		$libBoost_dev 
$pack_tools 
		$pack_netgen 
$pack_occt 
		$pack_calculix 
cmake 

&& apt-get autoremove -y 

&& apt-get install -y 

libfreeimage3 
libtbb2 
libhdf5-10 
libfreetype6 
openssh-client 
# libBoost-1.58 libboost-atomic1.58.0 
libboost-chrono1.58.0 
libboost-filesystem1.58.0 
libboost-program-options1.58.0 
libboost-python1.58.0 
libboost-regex1.58.0 
libboost-signals1.58.0 
libboost-system1.58.0 
libboost-thread1.58.0 
libboost-date-time1.58.0 
libboost-serialization1.58.0 
# libhdf5-dev libhdf5-cpp-11 libjpeg-dev libjpeg-turbo8-dev zlib1g-dev 

# gmsh 2.10.1 && apt-get install -y gmsh 

&& rm /usr/share/doc/* -fR WORKDIR /root

Wie muß der dockerfile bei Fakturama auf Debian basierend aussehen?
Debian, weil es wird von rheydenr als Testumgebung genutzt.

Die ersten Zeilen für einen Fakturama Docker Container:

# Dockerfile for Fakturama 2.0.2.1
FROM debian: stretch
MAINTAINER Vornamebeispiel Nachnamebeispiel 
RUN apt-get update && apt-get install -y
.
.
.
.


   
AntwortZitat
(@buchhalterfa)
Estimable Member
Beigetreten: vor 8 Jahren
Beiträge: 231
Topic starter  

Wo finde ich die Debian-Abhängigkeiten von Fakturame 2.0.2.1?

https://bitbucket.org/fakturamadev/fakturama-2

Das finde ich leider nichts, weil ich davon eigentlich keine Ahnung habe.



   
AntwortZitat
(@buchhalterfa)
Estimable Member
Beigetreten: vor 8 Jahren
Beiträge: 231
Topic starter  

Kann man daraus die Abhängigkeiten für einen Fakturama Docker Container ersehen?

Archlinux AUR Fakturama

https://aur.archlinux.org/packages/fakturama/

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=fakturama

# Maintainer: Helloagain 

_majorver=2.0.2
_minorver=1
pkgname=fakturama
pkgver=$_majorver.$_minorver
pkgrel=1
pkgdesc="Creates invoices with ZUGFeRD support"
arch=('x86_64')
url="https://www.fakturama.info"
license=('EPL')
groups=()
depends=(
	'java-runtime=8'
	'webkit2gtk'
)
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(
	"$pkgname-$pkgver.tar.gz:: https://files.fakturama.info/release/v$_majorver/Fakturama_linux_x64_$pkgver.tar.g z"
	"fakturama2.desktop"
)
noextract=()
sha256sums=(
	"cd207611743a1d79841fa835bd598f8cfc29def3d04acd17fd3f0723b51cbb70"
	"550964ece2b39f76e4985ecc2203fee63f57ef669d8b1ae170d80b3cfa5cb54c"
)

package() {
	# Get prefixed application directory
	_main_application="$pkgdir/usr/share/${pkgname}2"

	# Create entry under _main_application
	install -m 755 -d "$_main_application"

	# Copy all needed files
	cp -r "$srcdir/artifacts.xml" "$_main_application"
	cp -r "$srcdir/configuration" "$_main_application"
	cp -r "$srcdir/Fakturama" "$_main_application"
	cp -r "$srcdir/Fakturama.ini" "$_main_application"
	cp -r "$srcdir/features" "$_main_application"
	cp -r "$srcdir/p2" "$_main_application"
	cp -r "$srcdir/plugins" "$_main_application"

	# Copy other files
	install -Dm 644 "$srcdir/icon.xpm" "$pkgdir/usr/share/pixmaps/fakturama2.xpm"
	install -Dm 644 "$srcdir/fakturama2.desktop" "$pkgdir/usr/share/applications/fakturama2.desktop"
}

Wie Infos zu Fakturama:

- Die Debian Pakete werden durch install4J gebaut, da gibt's keine Anleitung.
https://www.ej-technologies.com/products/install4j/overview.html
- Infos zu Fakturama gibt's nur die, die auf der Homepage stehen oder dort verlinkt sind.



   
AntwortZitat
(@buchhalterfa)
Estimable Member
Beigetreten: vor 8 Jahren
Beiträge: 231
Topic starter  

Hallo, mein Wunsch ist in Erfüllung gegangen.

Großes Danke an helloagain.

https://hub.docker.com/r/helloagain/fakturama/

Dockerfile

FROM ubuntu:bionic


ENV FAKTURAMA_MAJOR="2.0.2"
ENV FAKTURAMA_VERSION="${FAKTURAMA_MAJOR}.1"
ENV DEBIAN_FRONTEND="noninteractive"
ENV DISPLAY=":0.0"
ENV LANG=de_DE.UTF-8
ENV LANGUAGE de_DE:en
ENV LC_ALL de_DE.UTF-8

COPY fakturama.deb /root/fakturama.deb

RUN apt-get update && 
 apt-get upgrade -y --no-install-recommends && 
 apt-get install -y locales && 
 sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && 
 locale-gen && 
 dpkg -i /root/fakturama.deb; 
 apt-get install -f -y --no-install-recommends && 
 apt-get install -y --no-install-recommends libwebkitgtk-3.0-0 locales && 
 apt-get install -y libreoffice gvfs && 
 rm -rf /var/lib/apt/lists/*

VOLUME "/tmp/.X11-unix"
VOLUME "/root/fakturama-workingdir"
VOLUME "/root/.fakturama2"

ENTRYPOINT ["/usr/share/fakturama2/Fakturama"]
Source Repository
 Eusebius1920/fakturama-docker

Getestet habe ich es noch nicht.

Wie binde ich eine Datenbank von dem Hostsystem ein?

--------------------------------------------------------------
--------------------------------------------------------------

helloagain, baut fakturama auch für Archlinux:

https://aur.archlinux.org/packages/fakturama/

MfG

buchhalterfa



   
AntwortZitat
(@buchhalterfa)
Estimable Member
Beigetreten: vor 8 Jahren
Beiträge: 231
Topic starter  

Hallo, mein Docker Container mit Fakturama läßt sich wie folgt starten:

sudo docker run -it --rm --name Fakturama --net=host -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix -v $HOME/.Xauthority:/root/.Xauthority:rw -v ~/.fakturama2:/root/.fakturama2 -v ~/Fakturama:/root/fakturama-workingdir helloagain/fakturama

Folgende Meldung erhalte ich beim Start:

https://s8.postimg.cc/q4k94zcfp/fakturam-docker-meldung.png

https://picload.org/view/dlpiaodl/fakturam-docker-meldung.png .html

Was hat das zu bedeuten?

Liegt das an Docker oder an Fakturama?

https://hub.docker.com/r/helloagain/fakturama/

Dockerfile von Helloagain:

FROM ubuntu:bionic


ENV FAKTURAMA_MAJOR="2.0.2"
ENV FAKTURAMA_VERSION="${FAKTURAMA_MAJOR}.1"
ENV DEBIAN_FRONTEND="noninteractive"
ENV DISPLAY=":0.0"
ENV LANG=de_DE.UTF-8
ENV LANGUAGE de_DE:en
ENV LC_ALL de_DE.UTF-8

COPY fakturama.deb /root/fakturama.deb

RUN apt-get update && 
 apt-get upgrade -y --no-install-recommends && 
 apt-get install -y locales xterm dbus dbus-x11 && 
 sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && 
 locale-gen && 
 dpkg -i /root/fakturama.deb; 
 apt-get install -f -y --no-install-recommends && 
 apt-get install -y --no-install-recommends libwebkitgtk-3.0-0 locales && 
 apt-get install -y libreoffice gvfs && 
 apt-get clean && 
 rm -rf /var/lib/apt/lists/*

VOLUME "/tmp/.X11-unix"
VOLUME "/root/fakturama-workingdir"
VOLUME "/root/.fakturama2"

ENTRYPOINT ["/usr/share/fakturama2/Fakturama"]

Github-Repository:
https://github.com/Eusebius1920/fakturama-docker

MfG

buchhalterfa



   
AntwortZitat
Teilen: