Commit d0e14388 authored by Romulo Pereira Goncalves's avatar Romulo Pereira Goncalves
Browse files

Make the docker container lighter.

parent cb9d03d4
Pipeline #51715 passed with stages
in 11 minutes and 57 seconds
FROM ubuntu:20.04
FROM r-base:4.2.1
RUN apt-get update -y && apt-get install -y gnupg2
RUN apt-get update -y && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get install -y -q dialog apt-utils && \
......@@ -6,37 +7,29 @@ RUN apt-get update -y && \
apt-get install cmake zlib1g-dev libpng-dev libjpeg-dev -y && \
apt-get install wget vim zip unzip curl git jq apt-rdepends -y && \
apt-get install strace bzip2 cron make gcc -y
# Be able to get dates
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install tzdata
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN dpkg-reconfigure --frontend noninteractive tzdata
# add user hasa
RUN /bin/bash -i -c "\
groupadd -g 1000 hasa && \
useradd -g 1000 -u 1000 -m -s $(which bash) hasa && \
groupadd -g 1001 hasa && \
useradd -g 1001 -u 1001 -m -s $(which bash) hasa && \
cat /root/.bashrc > /home/hasa/.bashrc \
"
# install dependencies
RUN apt-get update -y && \
apt-get install -y libjq-dev protobuf-compiler libprotobuf-dev proj-bin gdal-bin libgdal-dev jq libv8-dev pandoc
apt-get install -y libjq-dev protobuf-compiler libprotobuf-dev proj-bin gdal-bin libgdal-dev jq libv8-dev pandoc libsodium-dev libsecret-1-dev libfreetype6-dev fontconfig libfontconfig1-dev r-cran-lubridate
# install R
RUN /bin/bash -i -c "\
fc-cache -f -v && \
apt-get install -y dirmngr gnupg apt-transport-https ca-certificates software-properties-common && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' && \
apt-get install -y r-base \
"
# install Python and pip
RUN /bin/bash -i -c "\
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update -y && \
apt-get install -y python3.8 && \
apt-get install -y python3-pip \
"
# install Python dependencies
RUN /bin/bash -i -c "\
pip3 install geojson \
"
# install jupyter-lab and IRkernel
RUN /bin/bash -i -c "\
pip3 install jupyterlab \
apt-get install -y texlive-latex-base texlive-latex-recommended texlive-pictures texlive-latex-extra texlive-fonts-extra libharfbuzz-dev libfribidi-dev && \
apt-get install -y python3-pip ; pip3 install junit2html && \
apt-get install -y qpdf ghostscript r-base \
"
# install IRkernel and HaSa
COPY hasa /home/hasa/HaSa
......@@ -44,7 +37,4 @@ COPY install.R /home/hasa/install.R
RUN /bin/bash -i -c "\
Rscript /home/hasa/install.R \
"
# install Firefox
RUN apt-get -y install firefox
RUN apt-get -y install xauth
EXPOSE 8887
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment