Skip to content

Instantly share code, notes, and snippets.

@dpwrussell

dpwrussell/Dockerfile

Last active Apr 6, 2017
Embed
What would you like to do?
webtagging-docker53
FROM omero-grid-web53
MAINTAINER douglas_russell@hms.havard.edu
USER root
RUN pip install -r /home/omero/OMERO.server/share/web/requirements-py27.txt
RUN pip install -i https://testpypi.python.org/pypi omero-webtagging-autotag \
&& pip install -i https://testpypi.python.org/pypi omero-webtagging-tagsearch
USER omero
RUN /home/omero/OMERO.server/bin/omero config append omero.web.apps '"omero_webtagging_autotag"' \
&& /home/omero/OMERO.server/bin/omero config append omero.web.ui.center_plugins '["Auto Tag", "omero_webtagging_autotag/auto_tag_init.js.html", "auto_tag_panel"]' \
&& /home/omero/OMERO.server/bin/omero config append omero.web.apps '"omero_webtagging_tagsearch"' \
&& /home/omero/OMERO.server/bin/omero config append omero.web.ui.top_links '["Tag Search", "tagsearch"]'
ADD run.sh /home/omero/
EXPOSE 8080
#!/bin/bash
set -eu
if [ $# -gt 0 ]; then
echo "ERROR: Expected 0 args"
exit 2
fi
omero=/home/omero/OMERO.server/bin/omero
MASTER_ADDR=${MASTER_ADDR:-}
if [ -z "$MASTER_ADDR" ]; then
MASTER_ADDR=${MASTER_PORT_4064_TCP_ADDR:-}
fi
if [ -n "$MASTER_ADDR" ]; then
$omero config set omero.web.server_list "[[\"$MASTER_ADDR\", 4064, \"omero\"]]"
else
echo "WARNING: Master address not found"
# Assume it'll be set in /config/*
fi
if stat -t /config/* > /dev/null 2>&1; then
for f in /config/*; do
echo "Loading $f"
$omero load "$f"
done
fi
mkdir -p /home/omero/nginx/cache /home/omero/nginx/log /home/omero/nginx/temp
NGINX_OMERO=/etc/nginx/conf.d/omero-web.conf
if [ ! -f $NGINX_OMERO ]; then
echo "Creating $NGINX_OMERO"
$omero web config --http 8080 nginx > $NGINX_OMERO
fi
echo "Starting OMERO.web"
$omero web start
echo "Starting nginx"
exec nginx -g "daemon off;" -c /etc/nginx/nginx.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment