Skip to content

Commit

Permalink
Merge pull request #81 from khaledk2/build_rocky9
Browse files Browse the repository at this point in the history
Build rocky9
  • Loading branch information
jburel authored Dec 8, 2023
2 parents 5ee9810 + 1d9ff4d commit 978a540
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 32 deletions.
34 changes: 21 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
FROM centos:centos7.9.2009@sha256:dead07b4d8ed7e29e98de0f4504d87e8880d4347859d839686a31da35a3b532f
FROM rockylinux:9
LABEL maintainer="[email protected]"

ENV LANG en_US.utf-8
RUN dnf -y install epel-release
RUN dnf -y update
RUN dnf install -y glibc-langpack-en

ENV LANG en_US.utf-8
ENV RHEL_FRONTEND=noninteractive
RUN mkdir /opt/setup
WORKDIR /opt/setup
ADD playbook.yml requirements.yml /opt/setup/

RUN yum -y install epel-release \
&& yum -y install ansible sudo ca-certificates \
&& ansible-galaxy install -p /opt/setup/roles -r requirements.yml \
&& yum -y clean all \
&& rm -fr /var/cache
RUN dnf install -y ansible-core sudo ca-certificates
RUN ansible-galaxy install -p /opt/setup/roles -r requirements.yml
RUN dnf -y clean all
RUN rm -fr /var/cache

ARG OMERO_VERSION=5.6.9
ARG OMEGO_ADDITIONAL_ARGS=
ENV OMERODIR=/opt/omero/server/OMERO.server/
RUN ansible-playbook playbook.yml \
ENV OMERODIR=/opt/omero/server/OMERO.server

RUN ansible-playbook playbook.yml -vvv -e 'ansible_python_interpreter=/usr/bin/python3'\
-e omero_server_release=$OMERO_VERSION \
-e omero_server_omego_additional_args="$OMEGO_ADDITIONAL_ARGS" \
&& yum -y clean all \
&& rm -fr /var/cache
-e omero_server_omego_additional_args="$OMEGO_ADDITIONAL_ARGS"

RUN dnf -y clean all
RUN rm -fr /var/cache

RUN curl -L -o /usr/local/bin/dumb-init \
https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 && \
https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 && \
chmod +x /usr/local/bin/dumb-init

ADD entrypoint.sh /usr/local/bin/
ADD 50-config.py 60-database.sh 99-run.sh /startup/

USER omero-server
EXPOSE 4063 4064
ENV PATH=$PATH:/opt/ice/bin

VOLUME ["/OMERO", "/opt/omero/server/OMERO.server/var"]

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
2 changes: 1 addition & 1 deletion playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
omero_server_virtualenv: True
omero_server_python3: True
omero_server_python3_replace_omero: False
postgresql_version: "11"
postgresql_version: "14"
17 changes: 0 additions & 17 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,2 @@
# External Ansible roles required by this repository

- name: ome.basedeps
version: 1.2.0

- name: ome.ice
version: 4.3.0

- name: ome.java
version: 2.1.0

- name: ome.omero_common
version: 0.3.4

- name: ome.omero_server
version: 4.0.2

- name: ome.postgresql_client
version: 0.1.2
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cleanup || true


docker build -t $IMAGE .
docker run -d --name $PREFIX-db -e POSTGRES_PASSWORD=postgres postgres:10
docker run -d --name $PREFIX-db -e POSTGRES_PASSWORD=postgres postgres:14

# Check both CONFIG_environment and *.omero config mounts work
docker run -d --name $PREFIX-server --link $PREFIX-db:db \
Expand Down

0 comments on commit 978a540

Please sign in to comment.