Skip to content

Commit

Permalink
#114 modify way to install python3.4 on base image. remove installat…
Browse files Browse the repository at this point in the history
…ion of pip as the base image already have it
  • Loading branch information
apisu authored and apisu committed May 4, 2018
1 parent 98e7fd6 commit 928fd60
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
29 changes: 25 additions & 4 deletions cohorte-home/docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM ubuntu:16.04
# - wget
# - tar
# - nc
# - python 3.6
# - python 3.4
#
#-----------------------------------------------------------------------------

Expand Down Expand Up @@ -42,10 +42,26 @@ RUN apt-get update

RUN apt-get update

# installer d'autres outils
RUN apt-get install -y vim wget tar netcat-openbsd
# installer d'autres outils and python3.4 for ubuntu 16.04 @see https://github.com/mhbashari/Install-Python3.4-on-Ubuntu-16.04
RUN apt-get install -y curl vim wget tar netcat-openbsd
#RUN apt-get install -y epel-release
RUN apt-get install -y python3 python
RUN apt-get remove -y python3 python
RUN apt-get install -y build-essential checkinstall
RUN apt-get install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
RUN apt-get install -y libssl-dev openssl
RUN apt install -y lzma lzma-dev liblzma-dev
RUN wget https://www.python.org/ftp/python/3.4.4/Python-3.4.4.tgz
RUN tar xzf Python-3.4.4.tgz
RUN cd Python-3.4.4; ./configure --prefix=/opt/python3.4 --with-zlib-dir=/usr/local/lib/ --with-ensurepip=install
RUN cd Python-3.4.4 ; make altinstall

RUN ln -s /opt/python3.4/bin/python3.4 /usr/bin/python
RUN ln -s /opt/python3.4/bin/python3.4 /usr/bin/python3
RUN ln -s /opt/python3.4/bin/python3.4 /usr/bin/python3.4
RUN ln -s /opt/python3.4/bin/pip3 /usr/bin/pip3
RUN ln -s /opt/python3.4/bin/pip3 /usr/bin/pip

RUN ln -s /opt/python3.4/bin/pip3.4 /usr/bin/pip3.4

# to have systemctl command
RUN apt-get install -y systemd
Expand All @@ -57,6 +73,11 @@ COPY ./jdk/* /opt/java/
RUN chmod +x /opt/java/bin/*

RUN systemctl disable [email protected]
RUN systemctl disable [email protected]
RUN systemctl disable [email protected]
RUN systemctl disable [email protected]
RUN systemctl disable [email protected]
RUN systemctl disable [email protected]

# Test de java
RUN java -version
Expand Down
4 changes: 1 addition & 3 deletions cohorte-home/docker/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ RUN mkdir -p $COHORTE_DATA
COPY ./install/run_service /opt
COPY ./install/boot.sh /opt
COPY ./install/cohorte.service ./etc/systemd/system/cohorte.service
COPY ./install/get-pip.py /tmp/
COPY ./install/init_* /opt/

RUN chmod +x /opt/init*.sh

# install pip
RUN python3 /tmp/get-pip.py
# install simpleeval and jsoncomment
RUN pip3 install jsoncomment simpleeval

RUN chmod +x /opt/boot.sh
Expand Down

0 comments on commit 928fd60

Please sign in to comment.