forked from baseplate-admin/django-ltree-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (31 loc) · 1.23 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive \
LANG="en_US.UTF-8" \
LC_COLLATE="C" \
LC_ALL="en_US.UTF-8" \
PYENV_ROOT="/.pyenv" \
PATH="/.pyenv/bin:/.pyenv/shims:$PATH" \
TERM="xterm-256color"
RUN set -eux \
&& apt-get update \
# Common build deps
&& apt-get install -y --no-install-recommends locales git curl ca-certificates \
# Setup locales
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
# Get Pyenv installer
&& curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash \
# Pyenv build dependencies
&& apt-get install -y --no-install-recommends \
make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev \
libxml2-dev libxmlsec1-dev libffi-dev libpq-dev \
# Cleanup
&& apt-get purge -y --auto-remove curl \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY python-versions.txt ./
RUN set -eux \
&& pyenv update \
&& xargs -n 1 pyenv install < python-versions.txt \
&& pyenv global $(pyenv versions --bare) \
&& mv -v -- /python-versions.txt $PYENV_ROOT/version
WORKDIR /app