11FROM codercom/code-server:4.0.1
2+ ARG PYTHON_VERSION=3.10
23
34RUN sudo apt-get -y update && \
45 sudo apt-get -y install wget \
56 cmake \
67 jq \
78 bash-completion
8-
9+
10+ # Install kubectl
911RUN sudo wget "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" -O /usr/local/bin/kubectl && \
1012 sudo chmod +x /usr/local/bin/kubectl
11-
1213RUN sudo sh -c "kubectl completion bash >/etc/bash_completion.d/kubectl"
1314
15+ # Install helm
1416RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && \
1517 chmod 700 get_helm.sh && \
1618 ./get_helm.sh
1719
20+ # Install mc
1821RUN sudo wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /usr/local/bin/mc && \
1922 sudo chmod +x /usr/local/bin/mc
2023
21-
2224# Install vault
2325RUN sudo apt-get install -y unzip
2426RUN cd /usr/bin && \
@@ -28,38 +30,32 @@ RUN cd /usr/bin && \
2830RUN sudo vault -autocomplete-install
2931
3032# INSTALL MINICONDA -------------------------------
31-
3233RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
3334RUN bash Miniconda3-latest-Linux-x86_64.sh -b -p /home/coder/local/bin/conda
3435RUN rm -f Miniconda3-latest-Linux-x86_64.sh
3536
36- # RUN sudo chown -R coder:coder /home/coder/local/bin/conda
37- RUN sudo ln -s /home/coder/local/bin/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
38-
37+ # Add conda to PATH
3938ENV PATH="/home/coder/local/bin/conda/bin:${PATH}"
4039
4140# Install mamba (speed up packages install with conda)
4241# Must be in base conda env
4342RUN conda install mamba -n base -c conda-forge
4443
45- # Install env requirements in base env
44+ # Install env requirements
45+ RUN conda create -n basesspcloud python=$PYTHON_VERSION
4646COPY environment.yml .
47- RUN mamba env update -n base -f environment.yml
48-
49- RUN echo "alias pip=pip3" >> ~/.bashrc
50- RUN echo "alias python=python3" >> ~/.bashrc
47+ RUN mamba env update -n basesspcloud -f environment.yml
5148
52- RUN mkdir -p /home/coder/.vscode/
53- COPY settings.json /home/coder/.vscode/settings.json
49+ # Put additional VSCode settings in remote configuration
50+ RUN mkdir -p /home/coder/.local/share/code-server/Machine/
51+ COPY settings.json /home/coder/.local/share/code-server/Machine/settings.json
5452
5553# Nice colors in python terminal
56- RUN echo "import sys ; from IPython.core.ultratb import ColorTB ; sys.excepthook = ColorTB() ;" >> /home/coder/local/bin/conda/lib/python3.9 /site-packages/sitecustomize.py
54+ RUN echo "import sys ; from IPython.core.ultratb import ColorTB ; sys.excepthook = ColorTB() ;" >> /home/coder/local/bin/conda/lib/python${PYTHON_VERSION} /site-packages/sitecustomize.py
5755
5856# INSTALL VSTUDIO EXTENSIONS
59-
6057RUN code-server --install-extension ms-python.python
6158RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools
6259RUN code-server --install-extension eamodio.gitlens
63- RUN code-server --install-extension coenraads.bracket-pair-colorizer
6460RUN code-server --install-extension ms-azuretools.vscode-docker
6561RUN code-server --install-extension njpwerner.autodocstring
0 commit comments