forked from sree77hari/docker-spark
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dockerexp
51 lines (46 loc) · 1.63 KB
/
dockerexp
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
USER root
WORKDIR /root
SHELL [ "/bin/bash", "-c" ]
ARG PYTHON_VERSION_TAG=3.8.7
ARG LINK_PYTHON_TO_PYTHON3=1
# Existing lsb_release causes issues with modern installations of Python3
# https://github.com/pypa/pip/issues/4924#issuecomment-435825490
# Set (temporarily) DEBIAN_FRONTEND to avoid interacting with tzdata
RUN apt-get -qq -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \
gcc \
g++ \
zlibc \
zlib1g-dev \
libssl-dev \
libbz2-dev \
libsqlite3-dev \
libncurses5-dev \
libgdbm-dev \
libgdbm-compat-dev \
liblzma-dev \
libreadline-dev \
uuid-dev \
libffi-dev \
tk-dev \
wget \
curl \
git \
make \
sudo \
bash-completion \
tree \
vim \
software-properties-common && \
mv /usr/bin/lsb_release /usr/bin/lsb_release.bak && \
apt-get -y autoclean && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*
COPY install_python.sh install_python.sh
RUN bash install_python.sh ${PYTHON_VERSION_TAG} ${LINK_PYTHON_TO_PYTHON3} && \
rm -r install_python.sh Python-${PYTHON_VERSION_TAG}
# Enable tab completion by uncommenting it from /etc/bash.bashrc
# The relevant lines are those below the phrase "enable bash completion in interactive shells"
RUN export SED_RANGE="$(($(sed -n '\|enable bash completion in interactive shells|=' /etc/bash.bashrc)+1)),$(($(sed -n '\|enable bash completion in interactive shells|=' /etc/bash.bashrc)+7))" && \
sed -i -e "${SED_RANGE}"' s/^#//' /etc/bash.bashrc && \
unset SED_RANGE