Skip to content

Commit

Permalink
Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Oct 26, 2019
1 parent 95aaeaf commit b567f52
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ocrd/core:edge
MAINTAINER OCR-D
ENV DEBIAN_FRONTEND noninteractive

WORKDIR /build
COPY ocrd-im6convert .
COPY ocrd-tool.json .
COPY Makefile .

RUN apt-get update && \
apt-get -y install --no-install-recommends \
ca-certificates \
make \
imagemagick

RUN make install PREFIX=/usr/local

ENTRYPOINT ["/usr/local/bin/ocrd-im6convert"]
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ PREFIX ?= $(if $(VIRTUAL_ENV),$(VIRTUAL_ENV),$(CURDIR)/.local)
BINDIR = $(PREFIX)/bin
SHAREDIR = $(PREFIX)/share/ocrd-im6convert

# Docker tag
DOCKER_TAG = ocrd/im6convert

# Python pip to install with ('$(PIP)')
PIP ?= $(shell which pip)

Expand All @@ -19,11 +22,13 @@ help:
@echo " deps Install python packages"
@echo " install Install the executable in $(PREFIX)/bin and the ocrd-tool.json to $(SHAREDIR)"
@echo " uninstall Uninstall scripts and $(SHAREDIR)"
@echo " docker Build Docker image"
@echo ""
@echo " Variables"
@echo ""
@echo " PREFIX Directory to install to ('$(PREFIX)')"
@echo " PIP Python pip to install with ('$(PIP)')"
@echo " PREFIX Directory to install to ('$(PREFIX)')"
@echo " DOCKER_TAG Docker tag"
@echo " PIP Python pip to install with ('$(PIP)')"

# END-EVAL

Expand Down Expand Up @@ -57,3 +62,6 @@ uninstall:
done
rm -rfv $(SHAREDIR)

# Build Docker image
docker:
docker build -t '$(DOCKER_TAG)' .

0 comments on commit b567f52

Please sign in to comment.