-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
31 lines (31 loc) · 969 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM golang:1.20.4-buster
MAINTAINER Andrei Merlescu <andrei@projectapario.com>
WORKDIR /app
COPY . .
RUN rm -rf .git
RUN make install
RUN apt-get update && apt-get install -y \
ghostscript \
poppler-utils \
imagemagick \
libjpeg62-turbo-dev \
time \
exiftool \
xz-utils \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/pdfcpu/pdfcpu/releases/download/v0.4.1/pdfcpu_0.4.1_Linux_x86_64.tar.xz \
&& tar xf pdfcpu_0.4.1_Linux_x86_64.tar.xz \
&& mv pdfcpu_0.4.1_Linux_x86_64/pdfcpu /usr/local/bin \
&& rm pdfcpu_0.4.1_Linux_x86_64.tar.xz \
&& rm -rf pdfcpu_0.4.1_Linux_x86_64
RUN apt-get update && apt-get install -y \
tesseract-ocr \
tesseract-ocr-all \
&& rm -rf /var/lib/apt/lists/*
RUN go build -a -race -v -o /app/apario-contribution . \
&& chmod +x /app/apario-contribution \
&& useradd -m apario \
&& chown -R apario:apario /app
USER apario
CMD ["make", "containered"]