diff --git a/ubuntu-vscode-node/Dockerfile b/ubuntu-vscode-node/Dockerfile new file mode 100644 index 0000000..331052f --- /dev/null +++ b/ubuntu-vscode-node/Dockerfile @@ -0,0 +1,31 @@ +FROM ubuntu:22.04 + +SHELL [ "/bin/bash", "--login", "-i", "-c" ] + +RUN apt-get update -y && apt-get upgrade -y +RUN apt-get install apt-transport-https -y + +# Install generic tools like sudo curl wget ssh here +RUN apt-get install openssh-server sudo curl wget nano vim git -y +RUN sudo systemctl enable ssh + +# Install nvm and the latest lts version of node +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash +RUN source ~/.bashrc && nvm install --lts + +# Install vs code server +RUN curl -fsSL https://code-server.dev/install.sh | sh + +RUN useradd -ms /bin/bash kocoded-workspaces -p "$(openssl passwd -1 ubuntu)" +RUN usermod -aG sudo kocoded-workspaces +RUN systemctl enable code-server@kocoded-workspaces + +COPY vscode-config.yaml /home/kocoded-workspaces/.config/code-server/config.yaml +RUN chown -R kocoded-workspaces /home/kocoded-workspaces + +EXPOSE 22 +EXPOSE 65000 + +SHELL [ "/bin/bash", "--login", "-c" ] + +CMD [ "/sbin/init", "&&", "/bin/bash" ] \ No newline at end of file diff --git a/ubuntu-vscode-node/vscode-config.yaml b/ubuntu-vscode-node/vscode-config.yaml new file mode 100644 index 0000000..1bd700b --- /dev/null +++ b/ubuntu-vscode-node/vscode-config.yaml @@ -0,0 +1,4 @@ +bind-addr: 0.0.0.0:65000 +auth: none +password: false +cert: false \ No newline at end of file