| |
| FROM codercom/code-server:latest |
|
|
| |
| USER root |
|
|
| |
| RUN apt-get update && \ |
| apt-get install -y software-properties-common curl gnupg lsb-release && \ |
| add-apt-repository -y ppa:deadsnakes/ppa && \ |
| apt-get update && \ |
| apt-get install -y \ |
| python3.10 \ |
| python3.10-venv \ |
| python3.10-dev \ |
| python3-pip \ |
| build-essential \ |
| git \ |
| wget \ |
| unzip \ |
| nano \ |
| zip \ |
| ca-certificates \ |
| net-tools \ |
| xz-utils \ |
| openssh-client && \ |
| update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 && \ |
| curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ |
| apt-get install -y nodejs && \ |
| npm install -g npm yarn && \ |
| apt-get clean && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN pip3 install --no-cache-dir --upgrade pip setuptools wheel \ |
| && pip3 install --no-cache-dir ipython virtualenv jupyter |
|
|
| |
| RUN mkdir -p /home/coder/project && chown -R coder:coder /home/coder/project |
|
|
| |
| USER coder |
|
|
| |
| ENV PASSWORD=hfspacespassword |
| ENV PORT=7860 |
| ENV HOME=/home/coder |
|
|
| |
| RUN mkdir -p ~/.config/code-server && \ |
| echo '{ \ |
| "bind-addr": "0.0.0.0:7860", \ |
| "auth": "password", \ |
| "password": "'"${PASSWORD}"'", \ |
| "cert": false \ |
| }' > ~/.config/code-server/config.json |
|
|
| |
| WORKDIR /home/coder/project |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD ["code-server", "--port", "7860", "/home/coder/project"] |