-
-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 589 Bytes
/
Dockerfile
File metadata and controls
25 lines (19 loc) · 589 Bytes
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
FROM debian:bullseye-slim
LABEL maintainer="otiai10 <otiai10@gmail.com>"
ARG LOAD_LANG=jpn
RUN apt update \
&& apt install -y \
ca-certificates \
libtesseract-dev=4.1.1-2.1 \
tesseract-ocr=4.1.1-2.1 \
golang=2:1.15~1
ENV GO111MODULE=on
ENV GOPATH=${HOME}/go
ENV PATH=${PATH}:${GOPATH}/bin
ADD . $GOPATH/src/github.com/otiai10/ocrserver
WORKDIR $GOPATH/src/github.com/otiai10/ocrserver
RUN go get -v ./... && go install .
# Load languages
RUN if [ -n "${LOAD_LANG}" ]; then apt-get install -y tesseract-ocr-${LOAD_LANG}; fi
ENV PORT=8080
CMD ["ocrserver"]