Commit 9eca77e4 authored by Vicente Mataix Ferrándiz's avatar Vicente Mataix Ferrándiz 🐍
Browse files

Avoid clone

parent 18ca9ef8
Pipeline #245710 canceled with stage
in 5 minutes and 15 seconds
......@@ -8,9 +8,9 @@ build_docker:
retry: 2
tags:
- linux
only:
refs:
- master
rules:
- changes:
- docker/Dockerfile
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -f docker/Dockerfile -t $CI_REGISTRY/$CI_PROJECT_PATH:latest .
......@@ -22,9 +22,9 @@ build_docker_full:
retry: 2
tags:
- linux
only:
refs:
- master
rules:
- changes:
- docker/Dockerfile_full
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -f docker/Dockerfile_full -t $CI_REGISTRY/$CI_PROJECT_PATH:full .
......
......@@ -8,7 +8,6 @@ FROM ubuntu:latest
# Identify the maintainer of an image
LABEL maintainer="vicente.mataix-ferrandiz@inria.fr"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y clean
RUN apt-get -y update
RUN apt-get -y upgrade
......@@ -17,7 +16,6 @@ RUN apt-get install -y \
bash \
wget \
curl \
git \
cmake \
build-essential && \
apt-get autoremove -y
......@@ -26,7 +24,6 @@ RUN apt-get -y clean
# Creation of a "non-root" user
ENV USER "formation"
RUN useradd --create-home ${USER}
USER ${USER}
# Default working directory is
WORKDIR /home/${USER}
......@@ -36,18 +33,18 @@ RUN rm -rf Miniconda3-latest-Linux-x86_64.sh
# Changing to home
WORKDIR /home/${USER}
RUN git clone https://gitlab.inria.fr/formations/cpp/gettingstartedwithmoderncpp.git
# Change the default shell to be bash
SHELL ["/bin/bash", "-c"]
RUN chown ${USER}:${USER} /home/${USER}/miniconda3/bin/conda
USER ${USER}
# Conda environment
# Create the environment:
WORKDIR /home/${USER}/gettingstartedwithmoderncpp
RUN /home/${USER}/miniconda3/bin/conda env create -f environment.yml
RUN /home/${USER}/miniconda3/bin/conda init bash
RUN source /home/${USER}/miniconda3/etc/profile.d/conda.sh
COPY environment.yml .
RUN /home/${USER}/miniconda3/bin/conda env create -f environment.yml
RUN /home/${USER}/miniconda3/bin/conda clean -a
# Change the default shell to be bash
SHELL ["/bin/bash", "-c"]
# Add to the bashrc
RUN echo "alias python=\"python3\"" >> ~/.bashrc
RUN echo "conda activate training_cpp_2021" >> ~/.bashrc
......
Markdown is supported
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