Skip to content

Commit

Permalink
Merge pull request OCR-D#239 from OCR-D/dockerfile-disable-resources-…
Browse files Browse the repository at this point in the history
…volume

Dockerfile: disable volume for resources
  • Loading branch information
kba authored Mar 5, 2021
2 parents 551a263 + b31ce06 commit 89c570f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ LABEL \
# coinciding with the Python system prefix
ENV PREFIX=/usr
ENV VIRTUAL_ENV $PREFIX
# avoid HOME/.local/share (hard to predict USER here)
# so let XDG_DATA_HOME coincide with fixed system location
# (can still be overridden by derived stages)
ENV XDG_DATA_HOME /usr/local/share
VOLUME $XDG_DATA_HOME/ocrd-resources
# declaring volumes prevents derived stages
# from placing data there (cannot be undeclared),
# preventing the use-case of images bundled with models;
# also, this adds little value over runtime --mount
# VOLUME $XDG_DATA_HOME/ocrd-resources
ENV HOME /

# make apt run non-interactive during build
Expand Down

0 comments on commit 89c570f

Please sign in to comment.