Skip to content

Instantly share code, notes, and snippets.

@joshmoore
Last active August 17, 2018 16:18
Show Gist options
  • Save joshmoore/44143b063ef20e67960381428659de3c to your computer and use it in GitHub Desktop.
Save joshmoore/44143b063ef20e67960381428659de3c to your computer and use it in GitHub Desktop.
OMERO ubuntu/docker test
---
version: '3'
# http://www.openmicroscopy.org/explore/
services:
db:
image: postgres
environment:
- POSTGRES_PASSWORD=postgres
omero:
image: openmicroscopy/omero-server:5.4
environment:
- CONFIG_omero_db_user=postgres
- CONFIG_omero_db_name=postgres
- CONFIG_omero_db_pass=postgres
- ROOTPASS=omero
test:
image: test
tty: true
stdin_open: true
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8
env OMERO_OPT_DIR=/opt/omero
RUN apt-get update
# installed for convenience
RUN apt-get -y install unzip wget bc
# install Java
RUN apt-get -y install software-properties-common
RUN add-apt-repository -y ppa:openjdk-r/ppa
RUN apt-get update
RUN apt-get -y install openjdk-8-jre
# install dependencies
RUN apt-get update
RUN apt-get -y install \
unzip \
wget \
python-pip python-tables python-virtualenv python-yaml python-jinja2
# Omero Core
RUN apt-get -y install zlib1g-dev
RUN apt-get -y install python-pillow python-numpy
# Install Ice
env DEBIAN_FRONTEND=noninteractive
RUN apt-get -y install db5.3-util
RUN apt-get -y install libssl-dev libbz2-dev libmcpp-dev libdb++-dev libdb-dev
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 5E6DA83306132997
RUN apt-add-repository "deb http://zeroc.com/download/apt/ubuntu16.04 stable main"
RUN apt-get update
RUN apt-get -y install zeroc-ice-all-runtime zeroc-ice-all-dev
RUN pip install "zeroc-ice>3.5,<3.7"
# install Postgres
RUN apt-get -y install apt-transport-https
RUN add-apt-repository -y "deb https://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main 9.6"
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN apt-get update
RUN apt-get -y install postgresql-9.6
# Create an omero user
RUN adduser -disabled-password -q --gecos "" phenomic
RUN mkdir -p "$OMERO_OPT_DIR"
WORKDIR $OMERO_OPT_DIR
env SERVER=https://downloads.openmicroscopy.org/latest/omero5/server-ice36.zip
RUN wget $SERVER -O OMERO.server-ice36.zip
RUN unzip -q OMERO.server*
RUN ln -s OMERO.server-*/ OMERO.server
RUN chown -R phenomic $PWD
RUN echo "export PYTHON_PATH=/opt/omero/server/OMERO.server/lib/python:$PYTHON_PATH" >> /home/phenomic/.bashrc
RUN update-alternatives --config java
RUN java -version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment