Skip to content

Commit 12f4051

Browse files
author
Patrick Carey
committed
Add base pyenv image for build and test purposes
1 parent ab9eca8 commit 12f4051

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

pyenv/Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM ubuntu:18.04
2+
3+
# configure default environment
4+
ENV DEBIAN_FRONTEND noninteractive
5+
ENV LANG C.UTF-8
6+
ENV LC_ALL C.UTF-8
7+
ENV PATH /root/.pyenv/shims:/root/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
8+
ENV PYENV_ROOT /root/.pyenv
9+
ENV PYTHONDONTWRITEBYTECODE 1
10+
11+
# install system-level dependencies
12+
RUN apt-get update && \
13+
apt-get install -y git make build-essential libssl-dev zlib1g-dev \
14+
libbz2-dev libreadline-dev libsqlite3-dev wget curl \
15+
llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
16+
17+
# install and configure pyenv
18+
RUN curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
19+
RUN pyenv update
20+
21+
# install all supported Python versions
22+
RUN pyenv install 2.7.15
23+
RUN pyenv install 3.5.5
24+
RUN pyenv install 3.6.5
25+
RUN pyenv rehash
26+
RUN pyenv global 3.6.5 3.5.5 2.7.15
27+
28+
# install build and test dependencies
29+
RUN pip install --upgrade pip tox wheel
30+
31+
WORKDIR /usr/src/app
32+
CMD [ "python" ]

pyenv/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# pyenv
2+
3+
Docker image containing pyenv and multiple versions of Python. Used as a base image for testing and building Python libraries.
4+
5+
## Available versions
6+
7+
The following Python versions are available in this image:
8+
9+
- 2.7.15
10+
- 3.5.5
11+
- 3.6.5
12+
13+
## Available libraries
14+
15+
The following libraries are preinstalled globally in this image:
16+
17+
- `tox`: For testing against multiple versions of Python
18+
- `wheel`: For building binary wheels for distribution

0 commit comments

Comments
 (0)