diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml new file mode 100644 index 00000000000..ee915d1e3c9 --- /dev/null +++ b/.github/workflows/docker_build.yml @@ -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 . diff --git a/Dockerfile b/Dockerfile index da10e940fd3..3694bb63d70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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.: @@ -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 @@ -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