| FROM ubuntu:22.04 |
|
|
| |
| ENV DEBIAN_FRONTEND=noninteractive |
| ENV HOME=/root |
|
|
| |
| RUN apt-get update && \ |
| apt-get install -y curl wget gpg apt-transport-https git nodejs npm python3 python3-pip && \ |
| curl -fsSL https://code-server.dev/install.sh | sh && \ |
| apt-get clean && \ |
| rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN mkdir -p /workspace |
|
|
| |
| RUN mkdir -p /root/.config/code-server /root/.ollama |
|
|
| |
| RUN echo "bind-addr: 0.0.0.0:8443\nauth: none\ncert: false" > /root/.config/code-server/config.yaml |
|
|
| |
| RUN curl -fsSL https://ollama.com/install.sh | sh || true |
|
|
| |
| RUN code-server --install-extension ms-python.python && \ |
| code-server --install-extension ritwickdey.LiveServer && \ |
| code-server --install-extension ms-toolsai.jupyter |
|
|
| |
| RUN echo '#!/bin/bash\n\ |
| # Start Ollama in the background\n\ |
| /usr/local/bin/ollama serve &\n\ |
| \n\ |
| # Give Ollama a moment to start\n\ |
| sleep 2\n\ |
| \n\ |
| # Start code-server in the foreground\n\ |
| exec code-server --disable-telemetry --bind-addr 0.0.0.0:8443 /workspace\n\ |
| ' > /start.sh && \ |
| chmod +x /start.sh |
|
|
| |
| EXPOSE 8443 11434 |
|
|
| |
| WORKDIR /workspace |
|
|
| |
| CMD ["/start.sh"] |
|
|