atikur-rabbi commited on
Commit
250a9db
1 Parent(s): f23003b
tests/Dockerfile coder.txt ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Ubuntu 20.04 as the base image
2
+ FROM ubuntu:20.04
3
+
4
+ # Install curl to download code-server
5
+ RUN apt-get update && apt-get install -y curl
6
+
7
+ # Download and install code-server
8
+ RUN curl -fsSL https://code-server.dev/install.sh | sh
9
+
10
+ # Set the default port for code-server
11
+ ENV PORT=8081
12
+
13
+ # Set PASSWORD
14
+ ENV PASSWORD=password
15
+
16
+ # Create a non-root user with sudo privileges
17
+ RUN useradd -ms /bin/bash newuser && \
18
+ echo 'newuser:newpassword' | chpasswd && \
19
+ usermod -aG sudo newuser && \
20
+ echo 'newuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
21
+
22
+ # Expose the code-server port
23
+ EXPOSE 8081
24
+
25
+ # Switch to the non-root user
26
+ USER newuser
27
+
28
+ # Start code-server on container startup
29
+ CMD ["code-server", "--auth", "password", "--host", "0.0.0.0"]
tests/Dockerfile gitpod.txt ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM gitpod/openvscode-server:latest
2
+
3
+ ENV OPENVSCODE_SERVER_ROOT="/home/.openvscode-server"
4
+ ENV OPENVSCODE="${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server"
5
+
6
+ SHELL ["/bin/bash", "-c"]
7
+ RUN \
8
+ # Direct download links to external .vsix not available on https://open-vsx.org/
9
+ # The two links here are just used as example, they are actually available on https://open-vsx.org/
10
+ urls=(\
11
+ https://open-vsx.org/api/njzy/stats-bar/0.5.2/file/njzy.stats-bar-0.5.2.vsix \
12
+ )\
13
+ # Create a tmp dir for downloading
14
+ && tdir=/tmp/exts && mkdir -p "${tdir}" && cd "${tdir}" \
15
+ # Download via wget from $urls array.
16
+ && wget "${urls[@]}" && \
17
+ # List the extensions in this array
18
+ exts=(\
19
+ # From https://open-vsx.org/ registry directly
20
+ # gitpod.gitpod-theme \
21
+ # From filesystem, .vsix that we downloaded (using bash wildcard '*')
22
+ "${tdir}"/* \
23
+ )\
24
+ # Install the $exts
25
+ && for ext in "${exts[@]}"; do ${OPENVSCODE} --install-extension "${ext}"; done
26
+
tests/Working ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM gitpod/openvscode-server:latest
2
+ USER root
3
+
4
+ # RUN apt-get update -y && apt-get upgrade -y && apt-get install -y sudo && apt-get install -y python3-pip && pip3 install --upgrade pip
5
+ # RUN apt-get install -y curl gnupg wget htop sudo git git-lfs software-properties-common build-essential libgl1 zip unzip
6
+
7
+ # RUN add-apt-repository ppa:flexiondotorg/nvtop
8
+ # RUN apt-get upgrade -y
9
+ # RUN apt-get install -y nvtop
10
+
11
+ # RUN pip3 install pandas scipy matplotlib && \
12
+ # pip3 install ipywidgets && \
13
+ # pip3 install torch torchvision torchaudio
14
+
15
+ RUN apt-get update && apt-get install -y \
16
+ curl \
17
+ git \
18
+ nodejs \
19
+ npm \
20
+ && rm -rf /var/lib/apt/lists/*
21
+
22
+ USER openvscode-server
23
+
24
+ EXPOSE 7860
25
+
26
+ ENTRYPOINT [ "/bin/sh", "-c", "exec ${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server --host 0.0.0.0 --port 7860 --without-connection-token \"${@}\"", "--" ]
tests/dockerfile 8-9 ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM gitpod/openvscode-server:latest
2
+ USER root
3
+
4
+ # RUN apt-get update && apt-get install -y \
5
+ # curl \
6
+ # git \
7
+ # nodejs \
8
+ # npm \
9
+ # && rm -rf /var/lib/apt/lists/*
10
+
11
+ RUN apt-get update && apt-get install -y curl gnupg2 lsb-release && \
12
+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
13
+ apt-key fingerprint 1655A0AB68576280 && \
14
+ export VERSION=node_16.x && \
15
+ export DISTRO="$(lsb_release -s -c)" && \
16
+ echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list && \
17
+ echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list && \
18
+ apt-get update && apt-get install -y nodejs && \
19
+ node -v && npm -v && \
20
+ npm install -g yarn && \
21
+ npm install -g n8n && \
22
+ yarn -v && \
23
+ apt-get clean && \
24
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
25
+
26
+ RUN apt-get update && \
27
+ apt-get -y install openjdk-11-jdk-headless && \
28
+ apt-get clean && \
29
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
30
+ java -version && \
31
+ export JAVA_HOME=$(dirname $(dirname $(update-alternatives --list java)))
32
+
33
+ RUN npm install -g pm2
34
+ RUN curl -fsSL https://tailscale.com/install.sh | sh
35
+
36
+ ENV OPENVSCODE_SERVER_ROOT="/home/.openvscode-server"
37
+ ENV OPENVSCODE="${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server"
38
+
39
+ USER openvscode-server
40
+
41
+ # # copy ms-vscode-remote.remote-ssh-0.99.2023032015.vsix file to container
42
+ # COPY ms-vscode-remote.remote-ssh-0.99.2023032015.vsix /home/.openvscode-server/extensions/ms-vscode-remote.remote-ssh-0.99.2023032015.vsix
43
+ # # install ms-vscode-remote.remote-ssh-0.99.2023032015.vsix
44
+ # RUN ${OPENVSCODE} --install-extension /home/.openvscode-server/extensions/ms-vscode-remote.remote-ssh-0.99.2023032015.vsix
45
+
46
+ RUN ${OPENVSCODE} --install-extension njzy.stats-bar
47
+ RUN ${OPENVSCODE} --install-extension cweijan.vscode-ssh
48
+ RUN ${OPENVSCODE} --install-extension humao.rest-client
49
+
50
+ EXPOSE 7860
51
+
52
+ ENTRYPOINT [ "/bin/sh", "-c", "exec ${OPENVSCODE} --host 0.0.0.0 --port 7860 --without-connection-token \"${@}\"", "--" ]
53
+
tests/working ext Dockerfile.txt ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM gitpod/openvscode-server:latest
2
+ USER root
3
+
4
+ RUN apt-get update && apt-get install -y \
5
+ curl \
6
+ git \
7
+ nodejs \
8
+ npm \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ RUN npm install -g pm2
12
+
13
+ ENV OPENVSCODE_SERVER_ROOT="/home/.openvscode-server"
14
+ ENV OPENVSCODE="${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server"
15
+
16
+ USER openvscode-server
17
+
18
+ # # copy ms-vscode-remote.remote-ssh-0.99.2023032015.vsix file to container
19
+ # COPY ms-vscode-remote.remote-ssh-0.99.2023032015.vsix /home/.openvscode-server/extensions/ms-vscode-remote.remote-ssh-0.99.2023032015.vsix
20
+ # # install ms-vscode-remote.remote-ssh-0.99.2023032015.vsix
21
+ # RUN ${OPENVSCODE} --install-extension /home/.openvscode-server/extensions/ms-vscode-remote.remote-ssh-0.99.2023032015.vsix
22
+
23
+ RUN ${OPENVSCODE} --install-extension njzy.stats-bar
24
+ RUN ${OPENVSCODE} --install-extension cweijan.vscode-ssh
25
+
26
+ EXPOSE 7860
27
+
28
+ ENTRYPOINT [ "/bin/sh", "-c", "exec ${OPENVSCODE} --host 0.0.0.0 --port 7860 --without-connection-token \"${@}\"", "--" ]
29
+