-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #630 from binpash/update-debian-dockerimage-python3.8
Update debian docker image to have python3.8
- Loading branch information
Showing
1 changed file
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,30 @@ | ||
FROM debian:10 | ||
RUN apt-get update -y && apt-get install -y git | ||
ENV PASH_TOP=/opt/pash | ||
# download PaSh | ||
RUN git clone --depth 1 https://github.com/binpash/pash.git /opt/pash | ||
RUN bash /opt/pash/scripts/distro-deps.sh -o | ||
RUN yes | bash /opt/pash/scripts/setup-pash.sh -o | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
RUN apt-get update -y && apt-get install -y git sudo | ||
|
||
## Install pyenv to install python3.8 | ||
RUN apt install -y 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 | ||
RUN curl https://pyenv.run | bash | ||
|
||
## Add the necessary pyenv post-installation commands in .bashrc | ||
RUN echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> /root/.bashrc | ||
RUN echo 'eval "$(pyenv init -)"' >> /root/.bashrc | ||
RUN echo 'eval "$(pyenv virtualenv-init -)"' >> /root/.bashrc | ||
|
||
## Note that after this point we need to source /root/.bashrc before executing something with python3.8 in the Dockerfile | ||
|
||
## Install and set python 3.8.13 as the global python version | ||
RUN source /root/.bashrc && pyenv install -v 3.8.13 && pyenv global 3.8.13 | ||
|
||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US.UTF-8 | ||
ENV LC_COLLATE C | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
ENV PASH_TOP=/opt/pash | ||
# download PaSh | ||
RUN git clone https://github.com/binpash/pash.git /opt/pash | ||
RUN source /root/.bashrc && bash /opt/pash/scripts/distro-deps.sh -o | ||
RUN source /root/.bashrc && yes | bash /opt/pash/scripts/setup-pash.sh -o | ||
CMD ["/bin/bash"] |