Skip to content
Snippets Groups Projects
Dockerfile 852 B
Newer Older
Aaron Andreas's avatar
Aaron Andreas committed
# do a git clone first, make sure you've got calibre-web folder...
root's avatar
root committed

Aaron Andreas's avatar
Aaron Andreas committed

FROM ubuntu:18.04

RUN apt-get update
RUN apt-get install -y python python-pip python-virtualenv
RUN apt-get install -y imagemagick libmagickwand-dev
root's avatar
root committed

# create a non-root user
RUN groupadd -g 999 appuser && \
    useradd -r -u 999 -g appuser appuser

root's avatar
root committed
RUN mkdir -p /app /ebooks /config
root's avatar
root committed
WORKDIR /app

# copy calibre-web to /app
COPY calibre-web/ /app/
root's avatar
root committed

# install the requirements
RUN pip install -r requirements.txt

# install the optional stuff
RUN pip install -r optional-requirements.txt

# install lxml
# RUN pip install lxml
root's avatar
root committed

# install policy.xml into /etc/ImageMagick
COPY policy.xml /etc/ImageMagick-6/policy.xml

# fix some permissions
RUN chown -R appuser /app

root's avatar
root committed
# symlink calibre-web config
RUN ln -s /config/app.db /app/app.db

root's avatar
root committed
EXPOSE 8083/tcp
USER appuser
CMD python cps.py