-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
30 lines (26 loc) · 998 Bytes
/
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
FROM ubuntu:20.04
ENV APP_PATH=/app \
DEBIAN_FRONTEND=noninteractive \
PYTHONIOENCODING=utf-8 \
LANG=C.UTF-8
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends \
ca-certificates git make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
postgresql mysql-server && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl https://pyenv.run | bash
ENV PATH="/root/.pyenv/bin:${PATH}"
WORKDIR /app
COPY . .
ARG PYTHON_VERSION=3.10.4
RUN eval "$(pyenv init --path)" \
&& eval "$(pyenv virtualenv-init -)" \
&& pyenv install ${PYTHON_VERSION} \
&& pyenv global ${PYTHON_VERSION} \
&& pip install -e .[test]
RUN echo 'eval "$(pyenv init --path)"' >> /root/.bashrc
RUN echo 'eval "$(pyenv virtualenv-init -)"' >> /root/.bashrc