OSError: [Errno 28] No space left on device

I am attempting a docker build on aws and keep running out of disk space.

I have gone up to 48 GB SSD root volume and still run out of space. I have attempted s3 bucket mount but not sure if that is the right idea and am probably not making the correct mount point.

any suggestions?

Hi David,

What are you building and how ?

If you are using this script, it indeed requires a lot of space. Something like 50 GB of free storage when launching the script (at least this is what I have observed with Github build slaves). Avoid building the “full” images if you don’t need them since this requires a lot of space and time.

HTH,

Alain.

I am using the impressive Docker file derived from:
https://github.com/orthanc-server/orthanc-builder/blob/master/docker/orthanc/Dockerfile#L271

on an AWS Ubuntu medium instance with the following user data on install

#!/bin/bash
sudo -s
apt update
apt install s3fs awscli -y #### s3fs for mounting buckets & awscli required for build errors
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

I have added a few prerequisites to the beginning of the Dockerfile that appear to solve a few build errors.

########################## Prerequisites
RUN apt update &&
apt --assume-yes install libcrypto+±dev zlib1g-dev libssl-dev

I determined that I was only able to get an 8gb or 64gb gp2 SSD’s and any other size would simply default back to 8gb.
Additionally, the 64gb was only supported on the T2.Large and not the T2.medium, T2.small or T2.micro

Thanks and nice work!

Hi David,

Apologies if you’re building docker manually on purpose.

One of the key advantages of using docker is there are pre-built ready to use containers that don’t require you to build them. They are available at
https://hub.docker.com/r/osimis/orthanc

You can find examples on how to use them here

https://bitbucket.org/osimis/orthanc-setup-samples/src/master/docker/

Hope that helps.

James

Thanks for the reply

At the moment I seem to be getting more confused and going down all the wrong rabbit holes.

I started just wanting to get up to speed on DICOM servers. I built a god working Orthanc server on AWS but realized that I really needed some type of persistent storage for this to be a good functional working project.

I was attempting to build an s3 plugin and then ended up getting involved in in docker. At first I really did not want to get involved in docker but also liked the idea of a real life use case for docker.

At this moment sit I have figured out how to do the docker build but really do not know if I just built a complete server or simply modules. I also do not know if I need to expose a port in an attempt to run this server as a docker app or if I am simply using docker to build modules.

I am about to spin up another docker build to simply try and determine what is inside and how to use it.

Anything you can pass along to straighten me out would be great.

thanks for your input.

Hey David,

I manually built out my Dockerfile currently running out of ECS that utilizes S3 for storage and Aurora PostgreSQL as the relational database. The image itself is only about 3gig in space. I’m using the slim version of a Debian image. I’m not sure if this is helpful for you but I figured I’d pass it along for your experimentation.

FROM debian:bullseye-slim
LABEL maintainer “Callie Warner”

Port exposure 4242-DICOM 8042-web

EXPOSE 4242/tcp
EXPOSE 8042/tcp

Dockerfile args

ARG BASE_DIR=/root

Region based settings

ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC

RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get install -y curl wget tar zip unzip patch tzdata
RUN apt-get install -y libpq-dev postgresql-server-dev-all
RUN apt install -y mercurial
RUN apt install -y cmake build-essential pkg-config zlib1g-dev libssl-dev libcurl4-openssl-dev libgtest-dev libjsoncpp-dev libcrypto+±dev uuid-dev libboost-all-dev libsqlite3-dev libccd-dev ninja-build libcurl4-openssl-dev liblua5.1-0-dev libpng-dev libjpeg-dev libdcmtk2-dev libwrap0-dev libpugixml-dev libcivetweb-dev
RUN apt autoremove
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*

WORKDIR $BASE_DIR

Get repos

RUN hg clone https://hg.orthanc-server.com/orthanc/
RUN hg clone https://hg.orthanc-server.com/orthanc-object-storage/
RUN hg clone https://hg.orthanc-server.com/orthanc-databases/

#Create build directories
RUN mkdir orthanc/build
RUN mkdir orthanc-object-storage/build
RUN mkdir orthanc-databases/build

Make Orthanc directories

RUN mkdir -p /etc/orthanc
RUN mkdir -p /usr/share/orthanc/plugins

Orthanc S3 Plugin

WORKDIR $BASE_DIR/orthanc-object-storage/build
RUN cmake -DCMAKE_BUILD_TYPE:STRING=Release -DUSE_VCPKG_PACKAGES=OFF -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT=$BASE_DIR/orthanc/OrthancFramework/Sources …/Aws
RUN make -j 4
RUN cp *.so /usr/share/orthanc/plugins/

Orthanc PostgreSQL Plugin

WORKDIR $BASE_DIR/orthanc-databases/build
RUN cmake -DALLOW_DOWNLOADS=ON -DCMAKE_BUILD_TYPE:STRING=Release -DUSE_SYSTEM_GOOGLE_TEST=ON -DUSE_SYSTEM_ORTHANC_SDK=OFF …/PostgreSQL
RUN make -j 4
RUN cp *.so /usr/share/orthanc/plugins/

Orthanc build

WORKDIR $BASE_DIR/orthanc/build
RUN cmake -DALLOW_DOWNLOADS=ON -DCMAKE_BUILD_TYPE:STRING=Release -DSTANDALONE_BUILD=ON -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON -DUSE_SYSTEM_CIVETWEB=OFF -DUSE_SYSTEM_DCMTK=OFF -DUSE_SYSTEM_OPENSSL=OFF -DUSE_SYSTEM_CURL=OFF …/OrthancServer
RUN make -j 4
RUN make install

Copy local files

COPY /configs /etc/orthanc

Change permissions to execute

RUN chmod +x /usr/share/orthanc/plugins/*
RUN chmod +x /usr/local/bin/*

Run Orthanc

WORKDIR /usr/local/sbin/
CMD [ “Orthanc”, “-verbose”, “–trace”, “/etc/orthanc/” ]

Here is a simple example on how to use the prebuilt containers for aws & s3
https://bitbucket.org/osimis/orthanc-setup-samples/src/master/docker/aws/

Here is a far more advanced example
https://github.com/aws-samples/orthanc-cdk-deployment

@Callie

That looks awesome and something I can understand.

I think the only question I have is what is in /configs …??

@James
Thanks

Hey David, those are my Orthanc config files. For me I have:

orthanc.json (the main orthanc config)
extradicomtags.json (additional DICOM tags I need parsed and stored into the DB – this is very specific to my use case)
postgresql.json (my AWS postgres settings)
s3.json (my AWS S3 settings)

See the following for those configs:

https://book.orthanc-server.com/users/configuration.html

https://book.orthanc-server.com/faq/main-dicom-tags.html

https://book.orthanc-server.com/plugins/postgresql.html#usage

https://book.orthanc-server.com/plugins/object-storage.html#id1

@callie
I keep getting an endless loop when I run this docker image.

docker run -t -p 8042:8042 -p 4242:4242 docker-orthanc-img
.
.
T0319 22:46:18.085244 Connection.cpp:405] (sqlite) SQLite::Connection::FlushToDisk
T0319 22:46:18.096521 ServerContext.cpp:276] Serializing the content of the jobs engine
T0319 22:46:28.093830 Connection.cpp:405] (sqlite) SQLite::Connection::FlushToDisk
T0319 22:46:28.113257 ServerContext.cpp:276] Serializing the content of the jobs engine
T0319 22:46:38.098667 Connection.cpp:405] (sqlite) SQLite::Connection::FlushToDisk
T0319 22:46:38.130516 ServerContext.cpp:276] Serializing the content of the jobs engine
T0319 22:46:39.032095 OrthancWebDav.cpp:1244] Cleaning up the empty WebDAV upload folders

Do you have any idea what is going on here?

thanks