Skip to content

Commit f4f46ba

Browse files
committed
Update pandoc dockerfile and latex template and fix infinite build, fix pandoc always pull and fix strikethrough (#100, #103 and #115)
1 parent fd4aab6 commit f4f46ba

File tree

30 files changed

+2820
-481
lines changed

30 files changed

+2820
-481
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
COMPLY_USE_LOCAL_PANDOC=

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ output
33
dist
44
.envrc
55
bindata.go
6-
.idea/
6+
.idea/
7+
8+
.env

build/Dockerfile

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
1-
FROM haskell:latest
1+
FROM pandoc/ubuntu
22

3-
# based on implementation by James Gregory <[email protected]>
4-
MAINTAINER Comply <[email protected]>
5-
6-
# install latex packages
73
RUN apt-get update -y \
8-
&& apt-get install -y -o Acquire::Retries=10 --no-install-recommends \
9-
texlive-latex-base \
10-
texlive-xetex \
11-
texlive-fonts-recommended \
12-
latex-xcolor \
13-
texlive-latex-extra \
14-
fontconfig \
15-
unzip \
16-
lmodern
17-
18-
# will ease up the update process
19-
# updating this env variable will trigger the automatic build of the Docker image
20-
ENV PANDOC_VERSION "2.2.1"
21-
22-
# install pandoc
23-
RUN cabal update && cabal install pandoc-${PANDOC_VERSION}
4+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y -o Acquire::Retries=10 --no-install-recommends \
5+
texlive-latex-base \
6+
texlive-latex-extra \
7+
texlive-plain-generic \
8+
lmodern
249

2510
WORKDIR /source
26-
27-
ENTRYPOINT ["/root/.cabal/bin/pandoc"]
28-
29-
CMD ["--help"]

comply.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
package main
22

3-
import "github.com/strongdm/comply/internal/cli"
3+
import (
4+
"fmt"
5+
"path/filepath"
6+
"runtime"
7+
8+
"github.com/joho/godotenv"
9+
"github.com/strongdm/comply/internal/cli"
10+
)
411

512
func main() {
13+
_, b, _, _ := runtime.Caller(0)
14+
basepath := filepath.Dir(b)
15+
godotenv.Load(fmt.Sprintf("%s/.env", basepath))
616
cli.Main()
717
}

0 commit comments

Comments
 (0)