Build a dockerfile with VSCode, node, git and an ssh server
This commit is contained in:
parent
c2016ad8b8
commit
be9be64dc9
31
ubuntu-vscode-node/Dockerfile
Normal file
31
ubuntu-vscode-node/Dockerfile
Normal file
|
@ -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" ]
|
4
ubuntu-vscode-node/vscode-config.yaml
Normal file
4
ubuntu-vscode-node/vscode-config.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
bind-addr: 0.0.0.0:65000
|
||||||
|
auth: none
|
||||||
|
password: false
|
||||||
|
cert: false
|
Loading…
Reference in New Issue
Block a user