Open RagingTiger opened 1 year ago
Docker image is having trouble building Go binary. Complaining about ...
$ go build -o /bin/pdfinverter
go: downloading github.com/gen2brain/go-fitz v1.19.0
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/therecipe/qt v0.0.0-20200904063919-c0c124a5770d
go: downloading gopkg.in/gographics/imagick.v3 v3.4.0
# gopkg.in/gographics/imagick.v3/imagick
/go/pkg/mod/gopkg.in/gographics/imagick.v3@v3.4.0/imagick/affine_matrix.go:8:10: fatal error: MagickWand/MagickWand.h: No such file or directory
8 | #include <MagickWand/MagickWand.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Output of pkg-config
:
$ pkg-config --cflags --libs MagickWand
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/x86_64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/include/x86_64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -lMagickWand-6.Q16 -lMagickCore-6.Q16
This may be a good lead on how to build in a Docker container: https://github.com/gographics/imagick/tree/master/examples/docker
Begin the process of Dockerizing the repository. Some key features of the Dockerfile will be: