-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from shopkeep/noticket-pyenv
Add base pyenv image for build and test purposes
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM ubuntu:18.04 | ||
|
||
# configure default environment | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV LANG C.UTF-8 | ||
ENV LC_ALL C.UTF-8 | ||
ENV PATH /root/.pyenv/shims:/root/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | ||
ENV PYENV_ROOT /root/.pyenv | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
|
||
# install system-level dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y git make build-essential libssl-dev zlib1g-dev \ | ||
libbz2-dev libreadline-dev libsqlite3-dev wget curl \ | ||
llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev | ||
|
||
# install and configure pyenv | ||
RUN curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash | ||
RUN pyenv update | ||
|
||
# install all supported Python versions | ||
RUN pyenv install 2.7.15 | ||
RUN pyenv install 3.5.5 | ||
RUN pyenv install 3.6.5 | ||
RUN pyenv rehash | ||
RUN pyenv global 3.6.5 3.5.5 2.7.15 | ||
|
||
# install build and test dependencies | ||
RUN pip install --upgrade pip tox wheel | ||
|
||
WORKDIR /usr/src/app | ||
CMD [ "python" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# pyenv | ||
|
||
Docker image containing pyenv and multiple versions of Python. Used as a base image for testing and building Python libraries. | ||
|
||
## Available versions | ||
|
||
The following Python versions are available in this image: | ||
|
||
- 2.7.15 | ||
- 3.5.5 | ||
- 3.6.5 | ||
|
||
## Available libraries | ||
|
||
The following libraries are preinstalled globally in this image: | ||
|
||
- `tox`: For testing against multiple versions of Python | ||
- `wheel`: For building binary wheels for distribution |