diff --git a/.gitignore b/.gitignore index 341e568..dace708 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ /.vagrant -/versions diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index e405f8c..0000000 --- a/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM ubuntu:18.04 -RUN . /etc/os-release && \ - apt-get update && \ - apt-get install -y gnupg && \ - echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu ${UBUNTU_CODENAME} main" > /etc/apt/sources.list.d/deadsnakes.list && \ - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 && \ - apt-get update && \ - apt-get install -y \ - python-pip \ - python3-pip \ - python3-distutils \ - \ - python2.? \ - python2.?-dev \ - python3.? \ - python3.?-dev \ - python3.?-venv \ - && \ - pip3 install tox virtualenv && \ - apt-get --purge autoremove -y gnupg && \ - rm -rf /var/cache/apt/lists diff --git a/Dockerfile.bionic b/Dockerfile.bionic new file mode 100644 index 0000000..5c4a839 --- /dev/null +++ b/Dockerfile.bionic @@ -0,0 +1,6 @@ +FROM buildpack-deps:bionic +COPY setup.sh / +RUN bash setup.sh && rm /setup.sh +RUN apt-get update && \ + apt-get install -y python-pip python-setuptools && \ + rm -rf /var/cache/apt/lists diff --git a/Dockerfile.focal b/Dockerfile.focal new file mode 100644 index 0000000..d4bbd93 --- /dev/null +++ b/Dockerfile.focal @@ -0,0 +1,3 @@ +FROM buildpack-deps:focal +COPY setup.sh / +RUN bash setup.sh && rm /setup.sh diff --git a/Makefile b/Makefile deleted file mode 100644 index bf6ff51..0000000 --- a/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -TAG := fkrull/multi-python - -all: image versions-file - -image: - docker build -t $(TAG) . - -versions-file: - docker run --rm $(TAG) dpkg-query --show python2.? python3.? > versions diff --git a/README.md b/README.md index 189c875..48a3452 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,28 @@ +# DEPRECATED/REMOVED +This repository is not being updated any more. You can find the last version of the image in the [repository's packages](https://github.com/fkrull/docker-multi-python/pkgs/container/docker-multi-python). + # Docker Image With Many Python Versions -This is a Docker image that has many different Python versions pre-installed. It also comes with [tox](https://tox.readthedocs.io) so you can easily test your code on several different Python versions. +This is a Docker image that has many different Python versions pre-installed. The image is based on the [buildpack-deps image](https://hub.docker.com/_/buildpack-deps/). Python packages come from [the Deadsnakes PPA](https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa). + +The following additional Python development tools are installed: + +* [flit](https://flit.readthedocs.io/) +* [tox](https://tox.readthedocs.io) +* [virtualenv](https://virtualenv.pypa.io/) + +## Tags + +### [`focal`, `latest`](https://github.com/fkrull/docker-multi-python/blob/master/Dockerfile.focal) -## Details -The image is based on Ubuntu 18.04. Python packages come from [the Deadsnakes PPA](https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa). The following Python runtimes are installed: +Contains: + +* Python 2.7 +* Python 3.5+ + +### [`bionic`](https://github.com/fkrull/docker-multi-python/blob/master/Dockerfile.bionic) + +Contains: * Python 2.3 * Python 2.4 @@ -19,5 +38,6 @@ The image is based on Ubuntu 18.04. Python packages come from [the Deadsnakes PP * Python 3.7 * Python 3.8 * Python 3.9 - -This includes the header packages (`pythonx.y-dev`), venv, and distutils where applicable. In addition, tox and virtualenv are pre-installed. +* Python 3.10 +* Python 3.11 +* `pip` for Python 2.7 diff --git a/Vagrantfile b/Vagrantfile index bc6aa3d..9fe1e55 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,6 +5,6 @@ Vagrant.configure("2") do |config| config.vm.box = "bento/ubuntu-18.04" config.vm.provision :docker config.vm.provision :shell, inline: <<-EOF - echo cd /vagrant >> ~vagrant/.profile + echo "cd /vagrant" >> ~vagrant/.profile EOF end diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..72e579a --- /dev/null +++ b/setup.sh @@ -0,0 +1,36 @@ +#!/bin/sh +set -eu + +. /etc/os-release + +apt-get update +apt-get install -y gnupg +echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu ${UBUNTU_CODENAME} main" > /etc/apt/sources.list.d/deadsnakes.list +apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 + +apt-get update +apt-get install -y \ + python3-pip \ + python3-distutils \ + python3-setuptools \ + \ + python2.? \ + python2.?-dev \ + python3.? \ + python3.?-dev \ + python3.?-venv \ + python3.?? \ + python3.??-dev \ + python3.??-venv \ + ; + +pip3 install \ + flit \ + tox \ + virtualenv \ + ; + +apt-get --purge autoremove -y gnupg +rm -rf /var/cache/apt/lists + +dpkg-query --show python2.? python3.? python3.?? > /versions