Skip to content

Commit

Permalink
Update base image.
Browse files Browse the repository at this point in the history
  • Loading branch information
gllmflndn authored Feb 22, 2019
1 parent 16c6048 commit 5e0c0f1
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions matlab/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
FROM ubuntu:trusty
FROM ubuntu:bionic

MAINTAINER Guillaume Flandin <g.flandin@ucl.ac.uk>

RUN apt-get update && \
apt-get install -y unzip xorg wget libasound2 && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get update && apt-get -y install \
unzip xorg wget \
&& apt-get clean \
&& rm -rf \
/tmp/hsperfdata* \
/var/*/apt/*/partial \
/var/lib/apt/lists/* \
/var/log/apt/term*

# Install MATLAB MCR in /opt/mcr/
ENV MATLAB_VERSION R2018b
ENV MCR_VERSION v95
RUN mkdir /opt/mcr_install && \
mkdir /opt/mcr && \
wget -P /opt/mcr_install https://www.mathworks.com/supportfiles/downloads/${MATLAB_VERSION}/deployment_files/${MATLAB_VERSION}/installers/glnxa64/MCR_${MATLAB_VERSION}_glnxa64_installer.zip && \
unzip -q /opt/mcr_install/MCR_${MATLAB_VERSION}_glnxa64_installer.zip -d /opt/mcr_install && \
/opt/mcr_install/install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent && \
rm -rf /opt/mcr_install /tmp/*
RUN mkdir /opt/mcr_install \
&& mkdir /opt/mcr \
&& wget -P /opt/mcr_install https://www.mathworks.com/supportfiles/downloads/${MATLAB_VERSION}/deployment_files/${MATLAB_VERSION}/installers/glnxa64/MCR_${MATLAB_VERSION}_glnxa64_installer.zip \
&& unzip -q /opt/mcr_install/MCR_${MATLAB_VERSION}_glnxa64_installer.zip -d /opt/mcr_install \
&& /opt/mcr_install/install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent \
&& rm -rf /opt/mcr_install /tmp/*

# Install SPM Standalone in /opt/spm12/
ENV SPM_VERSION 12
ENV SPM_REVISION r7487
ENV LD_LIBRARY_PATH /opt/mcr/${MCR_VERSION}/runtime/glnxa64:/opt/mcr/${MCR_VERSION}/bin/glnxa64:/opt/mcr/${MCR_VERSION}/sys/os/glnxa64:/opt/mcr/${MCR_VERSION}/sys/opengl/lib/glnxa64
ENV MCR_INHIBIT_CTF_LOCK 1
RUN wget --no-check-certificate -P /opt https://www.fil.ion.ucl.ac.uk/spm/download/restricted/bids/spm${SPM_VERSION}_${SPM_REVISION}_Linux_${MATLAB_VERSION}.zip && \
unzip -q /opt/spm${SPM_VERSION}_${SPM_REVISION}_Linux_${MATLAB_VERSION}.zip -d /opt && \
rm -f /opt/spm${SPM_VERSION}_${SPM_REVISION}_Linux_${MATLAB_VERSION}.zip && \
/opt/spm${SPM_VERSION}/spm${SPM_VERSION} function exit
ENV SPM_HTML_BROWSER 0
RUN wget --no-check-certificate -P /opt https://www.fil.ion.ucl.ac.uk/spm/download/restricted/bids/spm${SPM_VERSION}_${SPM_REVISION}_Linux_${MATLAB_VERSION}.zip \
&& unzip -q /opt/spm${SPM_VERSION}_${SPM_REVISION}_Linux_${MATLAB_VERSION}.zip -d /opt \
&& rm -f /opt/spm${SPM_VERSION}_${SPM_REVISION}_Linux_${MATLAB_VERSION}.zip \
&& /opt/spm${SPM_VERSION}/spm${SPM_VERSION} function exit

# Configure entry point
ENTRYPOINT ["/opt/spm12/spm12"]
Expand Down

0 comments on commit 5e0c0f1

Please sign in to comment.