Skip to content

Commit

Permalink
Add docker runtimetest for easy local testing
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Sep 28, 2020
1 parent b9f7ee2 commit 4b47f18
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,21 @@ ENV OMERODIR=/opt/omero/web/OMERO.web/

VOLUME ["/opt/omero/web/OMERO.web/var"]
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

############################################################
# To use this as the output image run
# Adds whitenoise so you can easily test the image using:
# docker build --target=runtimetest -t omero-web:runtimetest
# docker run -it --rm -p 4080:4080 -e OMEROHOST=omero.example.org omero-web:runtimetest

FROM production as runtimetest

USER root
RUN /opt/omero/web/venv3/bin/pip install \
'whitenoise<6' && \
echo "config append -- omero.web.middleware '{\"index\": 0, \"class\": \"whitenoise.middleware.WhiteNoiseMiddleware\"}'" > /opt/omero/web/config/01-whitenoise.omero
USER omero-web

############################################################
# Make production the default output image
FROM production

0 comments on commit 4b47f18

Please sign in to comment.