Commit adf20a91 authored by Heimo Stranner's avatar Heimo Stranner
Browse files

Merge branch 'manuel.stoeger-master-patch-41355' into 'master'

Update Dockerfile, installing python3 and npm

See merge request !16
parents 92ce7528 97683765
Loading
Loading
Loading
Loading
+35 −1
Original line number Diff line number Diff line
FROM docker.io/codercom/code-server:latest
FROM docker.io/codercom/code-server:latest as base
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 \
    curl \
    python3-pip
RUN rm -rf /var/lib/apt/lists/*
RUN curl https://pyenv.run | bash

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

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