Skip to content

Commit

Permalink
upgrade to ubuntu 20.04 and python3 (#18, #19, #21)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Jan 22, 2024
1 parent ede13c5 commit a6bc4dd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@ The image contains features specific to our [SODAR](https://github.com/bihealth/
## Building

```bash
$ cd docker
$ docker build .
$ IRODS_PKG_VERSION=x.x.x-x ./build.sh
```

## Build Versions and iRODS Compatibility

Images are built and tagged for a specific iRODS release. The most recent build is tested to be compatible with iRODS version `4.3.1-0`.

Releases are tagged by the iRODS apt package version, followed with our own revision number starting from `1`. This means that e.g. the initial release for iRODS `4.3.1-0` will be tagged as ``4.3.1-0-1`. Fixes or improvements to that release would then be published as `4.3.1-0-2`.

Our goal is to keep up with the most recent major release of iRODS. Updates for older major versions will not be made.

**Note:** Images built for iRODS v4.3.x are **not** compatible with iRODS v4.2 or below.

## Data Persistency

Each container exposes volumes for data persistency. The list of volumes are provided in the table below:
Expand Down Expand Up @@ -40,7 +49,7 @@ iRODS can be run in either "provider" mode, which installs an iCAT catalogue ser

| Variable name | Default Value | Role |
|----------------------------------|----------------------------------|------------|
| IRODS_PKG_VERSION | 4.2.8-1 | both |
| IRODS_PKG_VERSION | 4.3.1-0 | both |
| IRODS_ROLE | provider | both |
| IRODS_HOST_NAME | localhost | both |
| IRODS_SERVICE_ACCOUNT_USER | irods | both |
Expand Down Expand Up @@ -78,7 +87,7 @@ iRODS can be run in either "provider" mode, which installs an iCAT catalogue ser

## SSSD Support

In addition to the base image, we provide the images `${VERSION}-sssd` (e.g., `4.2.11-1-sssd`) which have SSSD installed.
In addition to the base image, we provide the images `${VERSION}-sssd` (e.g., `4.3.1-0-sssd`) which have SSSD installed.
You will have to share `/var/lib/sss` between the SSSD container and iRODS so both containers can communicate.

In our installations, we run [bihealth/sssd-docker](https://github.com/bihealth/sssd-docker) in a second container.
Expand Down
23 changes: 12 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#
# Stage: first / main
#
FROM ubuntu:18.04 as main
FROM ubuntu:20.04 as main

LABEL org.opencontainers.image.authors="Manuel Holtgrewe <[email protected]>, Mikko Nieminen <[email protected]>"
LABEL org.opencontainers.image.source https://github.com/bihealth/irods-docker

ARG DEBIAN_FRONTEND=noninteractive

# Environment variables for container runtime
ENV IRODS_PKG_VERSION=4.3.0-1 \
ENV IRODS_PKG_VERSION=4.3.1-0 \
IRODS_ROLE=provider \
IRODS_HOST_NAME=localhost \
IRODS_SERVICE_ACCOUNT_USER=irods \
Expand Down Expand Up @@ -52,21 +52,22 @@ RUN chmod +x /usr/local/bin/wait

# Install general dependencies
RUN apt-get update && apt-get install -y apt-utils
RUN apt-get install -y python python-pip python-dev python3-distro sudo vim wget netcat lsb-release
RUN apt-get install -y python3 python3-dev python3-distro python3-pip sudo vim wget netcat rsyslog
# lsb-release g++ gnupg2

# Install database dependencies
RUN apt-get install -y unixodbc unixodbc-dev odbc-postgresql

# Install iRODS Python dependencies
RUN pip install pyodbc
RUN pip3 install pyodbc

# Install iRODS
RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | sudo apt-key add - \
&& echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/renci-irods.list \
&& echo "deb [arch=amd64] https://packages.irods.org/apt/ focal main" | sudo tee /etc/apt/sources.list.d/renci-irods.list \
&& apt-get update
RUN apt-get install -y irods-server=${IRODS_PKG_VERSION}~bionic \
irods-database-plugin-postgres=${IRODS_PKG_VERSION}~bionic \
irods-dev=${IRODS_PKG_VERSION}~bionic \
RUN apt-get install -y irods-server=${IRODS_PKG_VERSION}~focal \
irods-database-plugin-postgres=${IRODS_PKG_VERSION}~focal \
irods-dev=${IRODS_PKG_VERSION}~focal \
irods-rule-engine-plugin-python
RUN useradd -d /var/lib/irods ${IRODS_SERVICE_ACCOUNT_USER}

Expand All @@ -75,11 +76,11 @@ COPY files/irods_python-re_installer.py /
RUN chmod +x /irods_python-re_installer.py

# Install j2cli for templating
RUN apt-get install -y python-jinja2 python-yaml
RUN pip install j2cli
RUN apt-get install -y python3-jinja2 python3-yaml
RUN pip3 install j2cli

# Install Python PAM support
RUN apt-get install libpam-python pamtester
RUN apt-get install -y libpam-python pamtester

# Copy scripts and templates
COPY docker-entrypoint.sh files/irods_login.sh \
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if [[ "$1" == "irods-start" ]]; then
# Enable the python rule engine
if [ -f /irods_python-re_installer.py ]; then
echo "Enable python rule engine"
./irods_python-re_installer.py
python3 ./irods_python-re_installer.py
fi

touch /etc/irods/.provisioned
Expand Down

0 comments on commit a6bc4dd

Please sign in to comment.