diff --git a/.gitignore b/.gitignore index 341e568..0f194eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /.vagrant /versions +/.docker diff --git a/Dockerfile b/Dockerfile index 820bab9..6ca0c37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,15 +6,25 @@ RUN . /etc/os-release && \ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 && \ apt-get update && \ apt-get install -y \ - python-pip \ + git \ + \ python3-pip \ \ - python2.? \ - python2.?-dev \ - python3.? \ - python3.?-dev \ - python3.?-venv \ - && \ - pip3 install tox virtualenv && \ + python3.5 \ + python3.5-dev \ + python3.6 \ + python3.6-dev \ + python3.7 \ + python3.7-dev \ + python3.8 \ + python3.8-dev + +RUN apt-get install -y libpq-dev && \ + python3.7 -m pip install tox virtualenv pytest && \ apt-get --purge autoremove -y gnupg && \ - rm -rf /var/cache/apt/lists + rm -rf /var/cache/apt/lists && \ + useradd -rm -d /home/app -s /bin/bash -g root -G sudo -u 1000 app + +USER app + +WORKDIR /app diff --git a/Makefile b/Makefile index bf6ff51..660034d 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,8 @@ -TAG := fkrull/multi-python +TAG := massware/multi-python3 -all: image versions-file - -image: +build: docker build -t $(TAG) . -versions-file: - docker run --rm $(TAG) dpkg-query --show python2.? python3.? > versions +push: + $(MAKE) build + docker --config .docker push $(TAG):latest diff --git a/README.md b/README.md index 259629c..1818a8a 100644 --- a/README.md +++ b/README.md @@ -5,18 +5,9 @@ This is a Docker image that has many different Python versions pre-installed. It ## 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: -* Python 2.3 -* Python 2.4 -* Python 2.5 -* Python 2.6 -* Python 2.7 -* Python 3.1 -* Python 3.2 -* Python 3.3 -* Python 3.4 * Python 3.5 * Python 3.6 * Python 3.7 * Python 3.8 -This includes the header packages (`pythonx.y-dev`) and venv where applicable. In addition, tox and virtualenv are pre-installed. +This includes the header packages (`python3.{5-8}-dev`) and venv where applicable, psql client. In addition, tox and virtualenv are pre-installed.