| FROM ubuntu:22.04 |
|
|
| ENV DEBIAN_FRONTEND=noninteractive |
| ENV PORT=7860 |
| ENV PASSWORD=123 |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| curl \ |
| wget \ |
| git \ |
| sudo \ |
| ca-certificates \ |
| gnupg \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ |
| && apt-get install -y nodejs |
|
|
| |
| RUN curl -fsSL https://code-server.dev/install.sh | sh |
|
|
| |
| RUN useradd -m vscode && echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers |
|
|
| USER vscode |
| WORKDIR /home/vscode |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD ["code-server", "--bind-addr", "0.0.0.0:7860", ".", "--auth", "password"] |