Commit 97683765 authored by Manuel Stöger's avatar Manuel Stöger
Browse files

Update Dockerfile

parent 072aa5fd
Loading
Loading
Loading
Loading
+24 −2
Original line number Diff line number Diff line
@@ -3,12 +3,21 @@ RUN whoami
USER root

RUN apt-get update
RUN apt install software-properties-common -y

FROM base as sys_install
RUN whoami
USER root
# RUN add-apt-repository ppa:deadsnakes/ppa
# RUN apt-get update
RUN apt-get install -y \
    npm \
    python3 
    curl \
    python3-pip
RUN rm -rf /var/lib/apt/lists/*
RUN curl https://pyenv.run | bash

FROM base as builder
FROM sys_install as builder

RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
RUN install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
@@ -16,7 +25,20 @@ RUN install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
FROM builder as prod

USER coder

RUN curl https://pyenv.run | bash

RUN mkdir -p /home/coder/.config/code-server/
RUN echo "bind-addr: 127.0.0.1:8080\nauth: none\ncert: false" > /home/coder/.config/code-server/config.yaml
RUN cat /home/coder/.config/code-server/config.yaml
RUN kubectl
RUN echo "# pyenv" >> .bashrc
RUN echo "export PATH=\"$HOME/.pyenv/bin:$PATH\"" >> .bashrc
RUN echo "eval \"$(pyenv init --path)\"" >> .bashrc
RUN echo "eval \"$(pyenv virtualenv-init -)\"" >> .bashrc

RUN python3 --version
RUN pip3 --version
RUN $HOME/.pyenv/bin/pyenv --version
RUN $HOME/.pyenv/bin/pyenv install 3.12.0
RUN $HOME/.pyenv/bin/pyenv versions