This commit is contained in:
James R. Barlow 2015-08-18 05:38:05 -07:00
parent b3ee743ed7
commit 898b2b000a
2 changed files with 16 additions and 4 deletions

View File

@ -33,11 +33,18 @@ RUN apt-get install -y wget
# Ubuntu 14.04's ensurepip is broken
# http://www.thefourtheye.in/2014/12/Python-venv-problem-with-ensurepip-in-Ubuntu.html
RUN python3 -m venv . --without-pip
RUN /bin/bash -c "source ./bin/activate \
&& wget -O - -o /dev/null https://bootstrap.pypa.io/get-pip.py | python \
&& deactivate"
RUN python3 -m venv appenv --without-pip
RUN . /appenv/bin/activate; \
wget -O - -o /dev/null https://bootstrap.pypa.io/get-pip.py | python
RUN apt-get install -y gcc python3-dev
RUN . /appenv/bin/activate; \
pip install https://github.com/fritz-hh/ocrmypdf/zipball/master
USER docker
WORKDIR /home/docker
ADD docker-wrapper.sh /home/docker/docker-wrapper.sh
# Must use array form of ENTRYPOINT because Docker loves arbitrary and stupid rules
ENTRYPOINT ["/home/docker/docker-wrapper.sh"]

5
docker-wrapper.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
. /appenv/bin/activate
cd /home/docker
exec ocrmypdf "$@"