Dockerfile 987 Bytes
Newer Older
1
2
# Inspired from https://pythonspeed.com/articles/activate-conda-dockerfile
FROM continuumio/miniconda3
3

4
LABEL maintainer Vicente Mataix Ferrandiz "vicente.mataix-ferrandiz@inria.fr" and Sébastien Gilles "sebastien.gilles@inria.fr"
5

6
# Create non root user and give him the ownership of /opt/conda.
7
8
ENV USER "formation"
RUN useradd --create-home ${USER}
9
RUN chown ${USER}:${USER} /opt/conda
10
11
USER ${USER}

12
13
14
15
# Create the environment:
WORKDIR /home/${USER}/gettingstartedwithmoderncpp
COPY environment.yml .
RUN conda env create -f environment.yml 
16

17
# Make RUN commands use the new environment:
18
19
SHELL ["/bin/bash", "-c"]

20
21
# The code to run when container is started:
# Using informations from https://hub.docker.com/r/continuumio/miniconda3 and options used by Vicente in former Docker file based on Ubuntu.
Vicente Mataix Ferrándiz's avatar
Vicente Mataix Ferrándiz committed
22
ENTRYPOINT [ "conda", "run", "--no-capture-output", "-n", "training_cpp_2021", "jupyter", "lab", "--port=8888", "--ip=0.0.0.0", "--no-browser","--allow-root","--NotebookApp.token=''"]