Created
January 4, 2021 10:44
-
-
Save jmannau/c43db64001eb47e889e4b28b70822e12 to your computer and use it in GitHub Desktop.
Building Orthanc Storage Plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:buster-20200514-slim as build-plugin-s3 | |
#### START Setup build requirements #### | |
RUN export DEBIAN_FRONTEND=noninteractive && \ | |
apt-get --assume-yes update && \ | |
apt-get --assume-yes install vim && \ | |
apt-get --assume-yes install wget && \ | |
apt-get --assume-yes install curl && \ | |
apt-get --assume-yes install python3.7 && \ | |
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 libdcmtk14 && \ | |
apt-get --assume-yes install libboost-log1.67.0 libboost-filesystem1.67.0 libboost-locale1.67.0 libboost-regex1.67.0 libboost-system1.67.0 libboost-thread1.67.0 libboost-iostreams1.67.0 && \ | |
apt-get --assume-yes install libjpeg62-turbo && \ | |
apt-get --assume-yes install libjsoncpp1 && \ | |
apt-get --assume-yes install liblua5.3 && \ | |
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 libssl1.1 && \ | |
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 clean && \ | |
rm --recursive --force /var/lib/apt/lists/* | |
# 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 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 cmake | |
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.3-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 libdcmtk2-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 libcrypto++-dev | |
RUN mkdir -p /sources | |
RUN mkdir -p /build | |
#### END Setup build requirements #### | |
### Clone Orthanc S3 Repo | |
# RUN hg clone https://hg.orthanc-server.com/orthanc-object-storage/ -r "1.1.0" /sources/orthanc-object-storage/ | |
RUN hg clone https://hg.orthanc-server.com/orthanc-object-storage/ /sources/orthanc-object-storage/ | |
### START BUILD Orthanc S3 Plugin | |
WORKDIR /build | |
RUN ls /sources | |
# The S3 plugin only builds against orthanc 1.8.0 | |
RUN cmake -DUSE_VCPKG_PACKAGES=FALSE -DSTATIC_AWS_CLIENT=TRUE -DORTHANC_FRAMEWORK_VERSION=1.8.0 /sources/orthanc-object-storage/Aws | |
# When using either -DORTHANC_FRAMEWORK_VERSION=1.8.1 or 1.8.2 the following error occurs | |
# | |
# /sources/orthanc-object-storage/Common/StoragePlugin.cpp: In function 'int32_t OrthancPluginInitialize(OrthancPluginContext*)': | |
# /sources/orthanc-object-storage/Common/StoragePlugin.cpp:285:14: error: 'Orthanc::Logging' has not been declared | |
# Orthanc::Logging::InitializePluginContext(context); | |
# ^~~~~~~ | |
# /sources/orthanc-object-storage/Common/StoragePlugin.cpp:362:11: error: 'ERROR' was not declared in this scope | |
# LOG(ERROR) << "Exception while creating the object storage plugin: " << e.What(); | |
# ^~~~~ | |
# /sources/orthanc-object-storage/Common/StoragePlugin.cpp:362:7: error: 'LOG' was not declared in this scope | |
# LOG(ERROR) << "Exception while creating the object storage plugin: " << e.What(); | |
# ^~~ | |
# make[2]: *** [CMakeFiles/OrthancAwsS3Storage.dir/build.make:76: CMakeFiles/OrthancAwsS3Storage.dir/sources/orthanc-object-storage/Common/StoragePlugin.cpp.o] Error 1 | |
# | |
# RUN cmake -DUSE_VCPKG_PACKAGES=FALSE -DSTATIC_AWS_CLIENT=TRUE -DORTHANC_FRAMEWORK_VERSION=1.8.1 /sources/orthanc-object-storage/Aws | |
# RUN cmake -DUSE_VCPKG_PACKAGES=FALSE -DSTATIC_AWS_CLIENT=TRUE -DORTHANC_FRAMEWORK_VERSION=1.8.2 /sources/orthanc-object-storage/Aws | |
RUN make -j 4 | |
RUN ./UnitTests | |
### END BUILD Orthanc S3 Plugin | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment