76 lines
2.7 KiB
Docker
76 lines
2.7 KiB
Docker
|
# focal amd64 as of 2020-03-10
|
||
|
FROM ubuntu@sha256:d050ed7278c16ff627e4a70d7d353f1a2ec74d8a0b66e5a865356d92f5f6d87b
|
||
|
|
||
|
#######################################################################33
|
||
|
## Mirror Setup
|
||
|
## - option to use local mirror to speed build
|
||
|
#######################################################################33
|
||
|
ARG UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu
|
||
|
RUN echo "deb $UBUNTU_MIRROR focal main universe restricted multiverse" > /etc/apt/sources.list.new && \
|
||
|
echo "deb $UBUNTU_MIRROR focal-updates main universe restricted multiverse" >> /etc/apt/sources.list.new && \
|
||
|
echo "deb $UBUNTU_MIRROR focal-security main universe restricted multiverse" >> /etc/apt/sources.list.new && \
|
||
|
echo "deb $UBUNTU_MIRROR focal-backports main universe restricted multiverse" >> /etc/apt/sources.list.new && \
|
||
|
mv /etc/apt/sources.list.new /etc/apt/sources.list
|
||
|
|
||
|
#######################################################################33
|
||
|
## Versions
|
||
|
#######################################################################33
|
||
|
# master as of 2020-03-10
|
||
|
ARG PYENV_COMMIT=df9fa1dc30b6448ef8605e2c2d4dfc2a94d6a35d
|
||
|
ARG PYTHON_VERSION=3.8.1
|
||
|
|
||
|
#######################################################################33
|
||
|
## Packages
|
||
|
#######################################################################33
|
||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||
|
RUN apt update && \
|
||
|
apt upgrade -y && \
|
||
|
apt install -y \
|
||
|
build-essential \
|
||
|
curl \
|
||
|
git \
|
||
|
libbz2-dev \
|
||
|
libffi-dev \
|
||
|
liblzma-dev \
|
||
|
libncurses5-dev \
|
||
|
libncursesw5-dev \
|
||
|
libreadline-dev \
|
||
|
libsqlite3-dev \
|
||
|
libssl-dev \
|
||
|
llvm \
|
||
|
locales \
|
||
|
make \
|
||
|
python-openssl \
|
||
|
tk-dev \
|
||
|
wget \
|
||
|
xz-utils \
|
||
|
zlib1g-dev \
|
||
|
&& \
|
||
|
mkdir -p /var/app && \
|
||
|
git clone https://github.com/pyenv/pyenv.git /usr/local/pyenv && \
|
||
|
cd /usr/local/pyenv && \
|
||
|
git checkout $PYENV_COMMIT
|
||
|
|
||
|
ENV PYENV_ROOT /usr/local/pyenv
|
||
|
ENV PATH $PYENV_ROOT/bin:$PATH
|
||
|
|
||
|
|
||
|
#######################################################################33
|
||
|
## Python
|
||
|
#######################################################################33
|
||
|
RUN pyenv install $PYTHON_VERSION && \
|
||
|
pyenv global $PYTHON_VERISON && \
|
||
|
pip3 install pipenv
|
||
|
|
||
|
#######################################################################33
|
||
|
## Install Deps
|
||
|
#######################################################################33
|
||
|
ADD ./Pipfile ./Pipfile.lock /var/app/
|
||
|
WORKDIR /var/app
|
||
|
RUN pipenv install --python $(which python3)
|
||
|
|
||
|
#######################################################################33
|
||
|
## Install App
|
||
|
#######################################################################33
|
||
|
ADD ./* /var/app/
|