Skip to content

Commit

Permalink
Merge pull request #630 from binpash/update-debian-dockerimage-python3.8
Browse files Browse the repository at this point in the history
Update debian docker image to have python3.8
  • Loading branch information
angelhof authored Sep 7, 2022
2 parents ffa074f + d41f323 commit cdc0029
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions scripts/docker/debian/Dockerfile
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"]

0 comments on commit cdc0029

Please sign in to comment.