Skip to content
Snippets Groups Projects
Commit 4dc2ae03 authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

add docker alpine image

parent 568ad13b
No related branches found
No related tags found
No related merge requests found
# ~/.bashrc: executed by bash(1) for non-login shells.
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
# eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
alias la='ls -la'
alias h='history'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias inc='perl -le"print for @INC"'
echo "Trying to source ${DRIVE}/${CRUISE}/local/etc/skel/.bashrc.${CRUISE}"
if [ -f ${DRIVE}/${CRUISE}/local/etc/skel/.bashrc.${CRUISE} ]; then
. ${DRIVE}/${CRUISE}/local/etc/skel/.bashrc.${CRUISE}
echo "Yes, seems good !!!"
else
echo "Can't source file !!! check your network, hard drive and/or ENV variables !!!"
fi
.git
.travis.yml
*Dockerfile*
README.md
LICENSE.txt
FROM alpine:3.8
MAINTAINER Jacques Grelet "Jacques.Grelet@ird.fr"
ENV PACKAGES="\
dumb-init \
musl \
libc6-compat \
linux-headers \
build-base \
bash \
make \
git \
cmake \
netcdf-bin \
libnetcdf-dev \
libxml2 \
libxml2-dev \
ca-certificates \
libgcc \
libstdc++ \
tcl \
tk \
libssl1.0 \
net-tools \
iputils-ping \
"
ENV PYTHON_PACKAGES="\
numpy \
matplotlib \
scipy \
basemap \
toml \
pynmea2 \
pySerial \
netCDF4 \
seawater \
PyInstaller \
PySimpleGUI \
PySimpleGUIQt \
ConfigParser \
PySide2 \
PyAstronomy \
"
RUN apk add --no-cache --virtual build-dependencies python3 \
&& apk add --virtual build-runtime \
build-base python3-dev freetype-dev pkgconfig \
&& ln -s /usr/include/locale.h /usr/include/xlocale.h \
&& python3 -m ensurepip \
&& rm -r /usr/lib/python*/ensurepip \
&& pip3 install --upgrade pip setuptools \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& ln -sf pip3 /usr/bin/pip \
&& rm -r /root/.cache \
&& pip install --no-cache-dir $PYTHON_PACKAGES \
&& apk del build-runtime \
&& apk add --no-cache --virtual build-dependencies $PACKAGES \
&& rm -rf /var/cache/apk/*
VOLUME /data
RUN groupadd -r scientifiques && useradd -r -g scientifiques -p antea science
USER science
WORKDIR /home/science
#COPY .bashrc /root
COPY .bashrc /home/science
#Docker image for Python oceanographic containers
## build image from Docker file:
''''
docker build -t jgrelet/oceano2python:3.7 -f Dockerfile .
''''
## pull pull the existing images from Docker hub:
''''
docker pull jgrelet/oceano2python:3.6
''''
## run the container:
''''
docker run -it --rm -v /D_DRIVE:/data -e CRUISE="$CRUISE" -e DRIVE=/data python /bin/bash
''''
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment