Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Habitat Sampler
HabitatSampler
Commits
d0e14388
Commit
d0e14388
authored
Oct 17, 2022
by
Romulo Pereira Goncalves
Browse files
Make the docker container lighter.
parent
cb9d03d4
Pipeline
#51715
passed with stages
in 11 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docker/context/hasa.docker
View file @
d0e14388
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 100
0
hasa &&
\
useradd -g 100
0
-u 100
0
-m -s
$(
which bash
)
hasa &&
\
groupadd -g 100
1
hasa &&
\
useradd -g 100
1
-u 100
1
-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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment