Use pipenv and pyenv for CI/CD pipeline.
This commit is contained in:
@@ -3,4 +3,19 @@ FROM ubuntu:18.04
|
||||
MAINTAINER sumner "https://gitlab.com/sumner"
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y python3-pip libcairo2-dev pkg-config libgtk-3-dev libmpv-dev libglib2.0-dev gir1.2-notify-0.7
|
||||
export TZ=America/Denver DEBIAN_FRONTEND=noninteractive && \
|
||||
apt install -y \
|
||||
python3-pip libcairo2-dev pkg-config libgtk-3-dev libmpv-dev \
|
||||
libglib2.0-dev gir1.2-notify-0.7 make build-essential libssl-dev \
|
||||
zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
|
||||
libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev \
|
||||
liblzma-dev python-openssl git libgirepository1.0-dev
|
||||
|
||||
RUN cd /usr/local/src && \
|
||||
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
|
||||
|
||||
RUN pip3 install pipenv
|
||||
|
||||
# Install the correct Python version with pyenv
|
||||
COPY install-python.sh /tmp/install-python.sh
|
||||
RUN /tmp/install-python.sh
|
||||
|
6
cicd/python-build/install-python.sh
Executable file
6
cicd/python-build/install-python.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#! /bin/sh
|
||||
export PYENV_ROOT="${HOME}/.pyenv"
|
||||
export PATH="${PYENV_ROOT}/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
pyenv install 3.8.0
|
Reference in New Issue
Block a user