Skip to content

Commit

Permalink
AL2
Browse files Browse the repository at this point in the history
  • Loading branch information
paulineribeyre committed Jan 31, 2025
1 parent f909676 commit 731b871
Showing 1 changed file with 25 additions and 68 deletions.
93 changes: 25 additions & 68 deletions docker/orthanc/AmazonLinux2Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,88 +5,45 @@
# base image to build and execute orthanc.
# This image should contain only the packages that are common to both !
# The purpose of this intermediate image is to benefit from Docker cache.
ARG BASE_DEBIAN_IMAGE=bookworm-20250113-slim
FROM debian:$BASE_DEBIAN_IMAGE AS orthanc-runner-base
FROM quay.io/cdis/amazonlinux-base:master AS orthanc-runner-base
# FROM 707767160287.dkr.ecr.us-east-1.amazonaws.com/gen3/amazonlinux-base:master AS orthanc-runner-base

# we had some issues with one of the mirror -> force it to the Belgian mirror
# RUN rm /etc/apt/sources.list.d/debian.sources
# RUN echo "deb http://ftp.be.debian.org/debian/ bookworm main" | tee /etc/apt/sources.list.d/belgium.mirror.list

RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get --assume-yes update && \
apt-get --assume-yes install python3 && \
apt-get --assume-yes install python3-pip && \
apt-get --assume-yes install ca-certificates && \
apt-get --assume-yes install tzdata && \
apt-get --assume-yes install locales && \
apt-get --assume-yes install libcurl4 && \
apt-get --assume-yes install libdcmtk17 && \
apt-get --assume-yes install libboost-log1.74.0 libboost-filesystem1.74.0 libboost-locale1.74.0 libboost-regex1.74.0 libboost-system1.74.0 libboost-thread1.74.0 libboost-iostreams1.74.0 && \
apt-get --assume-yes install libjpeg62-turbo && \
apt-get --assume-yes install libjsoncpp25 && \
apt-get --assume-yes install liblua5.4 && \
apt-get --assume-yes install libpng16-16 && \
apt-get --assume-yes install libpugixml1v5 && \
apt-get --assume-yes install libsqlite3-0 && \
apt-get --assume-yes install libssl3 && \
apt-get --assume-yes install libuuid1 && \
apt-get --assume-yes install lsb-base && \
apt-get --assume-yes install zlib1g && \
apt-get --assume-yes install libpq5 && \
apt-get --assume-yes install libmariadb3 && \
apt-get --assume-yes install unixodbc && \
apt-get --assume-yes install libopenslide0 && \
apt-get --assume-yes install libcrypto++ && \
apt-get --assume-yes install libcpprest && \
apt-get --assume-yes install libprotobuf32 && \
apt-get --assume-yes clean && \
rm --recursive --force /var/lib/apt/lists/*
RUN yum -y update && \
yum -y install python3 python3-pip ca-certificates tzdata \
libcurl-devel boost-devel libjpeg-turbo-devel \
jsoncpp-devel lua-devel libpng-devel sqlite-devel \
openssl-devel libuuid-devel unixODBC-devel \
protobuf-devel && \
yum clean all
# Not found: libdcmtk-devel pugixml-devel lsb-core openslide-devel crypto++-devel cpprest-devel

# Make sure the en_US locale has been generated (required for
# case-insensitive comparison of strings with accents)
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
RUN locale-gen
RUN yum -y install glibc-locale-source glibc-langpack-en
RUN localedef -i en_US -f UTF-8 en_US.UTF-8

# ===> https://github.com/orthanc-server/orthanc-builder/blob/11d6930/docker/orthanc/Dockerfile.builder-base

########################## Orthanc builder base
# image to compile Orthanc and its plugins dynamically
FROM orthanc-runner-base AS orthanc-builder-base

RUN export DEBIAN_FRONTEND=noninteractive
RUN apt-get --assume-yes update
RUN apt-get --assume-yes install wget
RUN apt-get --assume-yes install build-essential
RUN apt-get --assume-yes install unzip
RUN apt-get --assume-yes install uuid-dev
RUN apt-get --assume-yes install apt-utils
RUN apt-get --assume-yes install libcurl4-openssl-dev
RUN apt-get --assume-yes install curl
RUN apt-get --assume-yes install apt-transport-https
RUN apt-get --assume-yes install liblua5.4-dev
RUN apt-get --assume-yes install libgtest-dev
RUN apt-get --assume-yes install libpng-dev
RUN apt-get --assume-yes install libsqlite3-dev
RUN apt-get --assume-yes install libjpeg-dev zlib1g-dev libdcmtk-dev libboost-all-dev libwrap0-dev libcharls-dev libjsoncpp-dev libpugixml-dev
RUN apt-get --assume-yes install git
RUN apt-get --assume-yes install mercurial
RUN apt-get --assume-yes install zip
RUN apt-get --assume-yes install libpq-dev postgresql-server-dev-all
RUN apt-get --assume-yes install python3-dev
RUN apt-get --assume-yes install unixodbc-dev
RUN apt-get --assume-yes install libgmock-dev
RUN apt-get --assume-yes install protobuf-compiler
# on recent Debian, the libmysql-dev package is not available anymore
# and the MariaDbConfiguration.cmake does not handle it correctly -> use the downloaded mariadb_client
RUN apt-get --assume-yes install default-libmysqlclient-dev
# RUN apt-get --assume-yes install libmariadb-dev

RUN apt-get --assume-yes install cmake
RUN apt-get --assume-yes install awscli
# for orthanc-stl plugin:
RUN apt-get --assume-yes install libgl1-mesa-dev libxt-dev

RUN apt-get --assume-yes install default-jdk
RUN yum -y update && \
yum -y install wget unzip gcc-c++ make cmake curl libuuid-devel \
python3 python3-pip ca-certificates tzdata libcurl-devel boost-devel \
libjpeg-turbo-devel zlib-devel git mercurial zip postgresql-devel \
protobuf-compiler aws-cli libpng-devel sqlite-devel \
lua-devel \
unixODBC-devel libpq-devel && \
yum clean all
# Not found: libgtest-devel libboost-all-devel libwrap0-devel libjsoncpp-devel libpugixml-devel

# RUN yum -y install java-1.8.0-openjdk-devel
RUN amazon-linux-extras install java-openjdk11

# # install a recent cmake version (required later by recent vcpkg versions that we don't use now !)
# WORKDIR /tmp
Expand Down Expand Up @@ -490,7 +447,7 @@ COPY test-aliveness.py /probes/


# cleanup unnecessary packages that can trigger errors during security scan
RUN apt purge --assume-yes build-essential perl bzip2 gnupg xdg-user-dirs && apt --assume-yes autoremove
RUN yum -y remove build-essential perl bzip2 gnupg xdg-user-dirs && yum -y autoremove


# always create an 'orthanc' group (gid=999) and an orthanc user (uid=999)
Expand Down

0 comments on commit 731b871

Please sign in to comment.