Install python 3.6 on AmazonLinux and make Docker image

Run Amazon Linux Container (and tunnelling)
> docker run -v $(pwd):/outputs --name lambdapack -d amazonlinux:latest tail -f /dev/null

Run container bash shell
> docker exec -i -t lambdapack /bin/bash
Install python 3.6
bash# yum -y update
bash# yum -y upgrade
bash# yum install -y \
 wget \
 gcc \
 gcc-c++ \
 findutils \
 zlib-devel \

bash# yum install -y yum-utils
bash# yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
bash# yum install -y python36.x86_64
bash# yum install -y python36-devel.x86_64
bash# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
bash# python36 get-pip.py
bash# pip3 install virtualenv
bash# exit

Make docker Image
> docker commit lambdapack marearts/amazon_linux_py36:v1.0.0

Push Docker Image to Docker Hub
>docker login
>docker push marearts/amazon_linux_py36:v1.0.0

Take Care!

1 comment:

  1. yum install -y https://repo.ius.io/ius-release-el7.rpm