Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image update #6370

Merged
merged 4 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Docker Build"
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:
build:
name: Build Docker image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: build docker
run: docker build .
41 changes: 19 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# By default, building this dockerfile will use
# the IMAGE argument below for the runtime image.
ARG BUILD_IMAGE=adoptopenjdk:11-jdk-hotspot-bionic
ARG BUILD_IMAGE=eclipse-temurin:11-jdk-jammy

# To build code with other runtimes
# pass a build argument, e.g.:
Expand All @@ -25,40 +25,38 @@ FROM ${BUILD_IMAGE} as build
USER root
ARG DEBIAN_FRONTEND=noninteractive

# From omero-install: step01_ubuntu1804_ice_deps.sh
# From omero-install: step01_ubuntu2204_ice_deps.sh
RUN apt-get update && \
apt-get install -y -q \
build-essential \
wget \
db5.3-util \
libbz2-dev \
libdb++-dev \
libdb-dev \
libexpat-dev \
libmcpp-dev \
libssl-dev \
bzip2 \
libdb++ \
libexpat1 \
libmcpp0 \
openssl \
mcpp \
zlib1g-dev \
zlib1g \
&& cd /tmp \
&& wget -q https://github.com/ome/zeroc-ice-ubuntu1804/releases/download/0.3.0/ice-3.6.5-0.3.0-ubuntu1804-amd64.tar.gz \
&& tar xf ice-3.6.5-0.3.0-ubuntu1804-amd64.tar.gz \
&& rm ice-3.6.5-0.3.0-ubuntu1804-amd64.tar.gz \
&& mv ice-3.6.5-0.3.0 /opt \
&& echo /opt/ice-3.6.5-0.3.0/lib/x86_64-linux-gnu > /etc/ld.so.conf.d/ice-x86_64.conf \
&& wget -q https://github.com/glencoesoftware/zeroc-ice-ubuntu2204-x86_64/releases/download/20221004/Ice-3.6.5-ubuntu2204-x86_64.tar.gz \
&& tar xf Ice-3.6.5-ubuntu2204-x86_64.tar.gz \
&& rm Ice-3.6.5-ubuntu2204-x86_64.tar.gz \
&& mv Ice-3.6.5 /opt/ice-3.6.5 \
&& echo /opt/ice-3.6.5/lib64 > /etc/ld.so.conf.d/ice-x86_64.conf \
&& ldconfig

RUN apt-get update \
&& apt-get install -y ant git gradle maven python3 python3-pip python3-venv \
python-pillow python-numpy python-sphinx
&& apt-get install -y ant git gradle maven python3 python3-pip python3-venv

ENV VIRTUAL_ENV=/opt/omero/server/venv3
ENV PATH=/opt/ice-3.6.5-0.3.0/bin:$VIRTUAL_ENV/bin/:$PATH
ENV PATH=/opt/ice-3.6.5/bin:$VIRTUAL_ENV/bin/:$PATH
RUN mkdir -p /opt/omero/server/ \
&& python3 -m venv $VIRTUAL_ENV
RUN python -m pip install --upgrade pip setuptools
RUN python -m pip install https://github.com/ome/zeroc-ice-ubuntu1804/releases/download/0.2.0/zeroc_ice-3.6.5-cp36-cp36m-linux_x86_64.whl
RUN python -m pip install --upgrade pip setuptools pillow numpy sphinx
RUN python -m pip install https://github.com/glencoesoftware/zeroc-ice-py-ubuntu2204-x86_64/releases/download/20221004/zeroc_ice-3.6.5-cp310-cp310-linux_x86_64.whl
RUN python -m pip install flake8 future pytest
RUN python -m pip install 'omero-py>=5.6.0.dev10'
RUN python -m pip install 'omero-py>=5.17.0'
RUN id 1000 || useradd -u 1000 -ms /bin/bash build

# TODO: would be nice to not need to copy .git since it invalidates the build frequently and takes more time
Expand Down Expand Up @@ -93,8 +91,7 @@ RUN sed -i "s/^\(omero\.host\s*=\s*\).*\$/\1omero/" /src/etc/ice.config
# RUN sed -i 's/\("IceSSL.Ciphers".*ADH[^"]*\)/\1:@SECLEVEL=0/' /src/components/tools/OmeroPy/src/omero/clients.py /src/etc/templates/grid/templates.xml

# Reproduce jenkins build
RUN env BUILD_NUMBER=1 OMERO_BRANCH=develop bash docs/hudson/OMERO.sh

RUN ./build.py
FROM ${RUN_IMAGE} as run
RUN rm -rf /opt/omero/server/OMERO.server
COPY --chown=omero-server:omero-server --from=build /src/dist /opt/omero/server/OMERO.server
Expand Down