Spaces:
Sleeping
Sleeping
Commit ·
250a9db
1
Parent(s): f23003b
up
Browse filesFiles changed (5)
- tests/Dockerfile coder.txtAdded+29
- tests/Dockerfile gitpod.txtAdded+26
- tests/WorkingAdded+26
- tests/dockerfile 8-9Added+53
- tests/working ext Dockerfile.txtAdded+29
1234567891011121314151617181920212223242526272829# Use Ubuntu 20.04 as the base imageFROM ubuntu:20.04
# Install curl to download code-serverRUN apt-get update && apt-get install -y curl
# Download and install code-serverRUN curl -fsSL https://code-server.dev/install.sh | sh
# Set the default port for code-serverENV PORT=8081
# Set PASSWORDENV PASSWORD=password
# Create a non-root user with sudo privilegesRUN useradd -ms /bin/bash newuser && \ echo 'newuser:newpassword' | chpasswd && \ usermod -aG sudo newuser && \ echo 'newuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Expose the code-server portEXPOSE 8081
# Switch to the non-root userUSER newuser
# Start code-server on container startupCMD ["code-server", "--auth", "password", "--host", "0.0.0.0"]1234567891011121314151617181920212223242526FROM gitpod/openvscode-server:latest
ENV OPENVSCODE_SERVER_ROOT="/home/.openvscode-server"ENV OPENVSCODE="${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server"
SHELL ["/bin/bash", "-c"]RUN \ # Direct download links to external .vsix not available on https://open-vsx.org/ # The two links here are just used as example, they are actually available on https://open-vsx.org/ urls=(\ https://open-vsx.org/api/njzy/stats-bar/0.5.2/file/njzy.stats-bar-0.5.2.vsix \ )\ # Create a tmp dir for downloading && tdir=/tmp/exts && mkdir -p "${tdir}" && cd "${tdir}" \ # Download via wget from $urls array. && wget "${urls[@]}" && \ # List the extensions in this array exts=(\ # From https://open-vsx.org/ registry directly # gitpod.gitpod-theme \ # From filesystem, .vsix that we downloaded (using bash wildcard '*') "${tdir}"/* \ )\ # Install the $exts && for ext in "${exts[@]}"; do ${OPENVSCODE} --install-extension "${ext}"; done 1234567891011121314151617181920212223242526FROM gitpod/openvscode-server:latestUSER root
# RUN apt-get update -y && apt-get upgrade -y && apt-get install -y sudo && apt-get install -y python3-pip && pip3 install --upgrade pip# RUN apt-get install -y curl gnupg wget htop sudo git git-lfs software-properties-common build-essential libgl1 zip unzip
# RUN add-apt-repository ppa:flexiondotorg/nvtop# RUN apt-get upgrade -y# RUN apt-get install -y nvtop
# RUN pip3 install pandas scipy matplotlib && \# pip3 install ipywidgets && \# pip3 install torch torchvision torchaudio
RUN apt-get update && apt-get install -y \ curl \ git \ nodejs \ npm \ && rm -rf /var/lib/apt/lists/* USER openvscode-server
EXPOSE 7860
ENTRYPOINT [ "/bin/sh", "-c", "exec ${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server --host 0.0.0.0 --port 7860 --without-connection-token \"${@}\"", "--" ]1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253FROM gitpod/openvscode-server:latestUSER root
# RUN apt-get update && apt-get install -y \# curl \# git \# nodejs \# npm \# && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y curl gnupg2 lsb-release && \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ apt-key fingerprint 1655A0AB68576280 && \ export VERSION=node_16.x && \ export DISTRO="$(lsb_release -s -c)" && \ echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list && \ echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list && \ apt-get update && apt-get install -y nodejs && \ node -v && npm -v && \ npm install -g yarn && \ npm install -g n8n && \ yarn -v && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get update && \ apt-get -y install openjdk-11-jdk-headless && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ java -version && \ export JAVA_HOME=$(dirname $(dirname $(update-alternatives --list java)))
RUN npm install -g pm2RUN curl -fsSL https://tailscale.com/install.sh | sh
ENV OPENVSCODE_SERVER_ROOT="/home/.openvscode-server"ENV OPENVSCODE="${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server"
USER openvscode-server
# # copy ms-vscode-remote.remote-ssh-0.99.2023032015.vsix file to container# COPY ms-vscode-remote.remote-ssh-0.99.2023032015.vsix /home/.openvscode-server/extensions/ms-vscode-remote.remote-ssh-0.99.2023032015.vsix# # install ms-vscode-remote.remote-ssh-0.99.2023032015.vsix# RUN ${OPENVSCODE} --install-extension /home/.openvscode-server/extensions/ms-vscode-remote.remote-ssh-0.99.2023032015.vsix
RUN ${OPENVSCODE} --install-extension njzy.stats-barRUN ${OPENVSCODE} --install-extension cweijan.vscode-sshRUN ${OPENVSCODE} --install-extension humao.rest-client
EXPOSE 7860
ENTRYPOINT [ "/bin/sh", "-c", "exec ${OPENVSCODE} --host 0.0.0.0 --port 7860 --without-connection-token \"${@}\"", "--" ]
1234567891011121314151617181920212223242526272829FROM gitpod/openvscode-server:latestUSER root
RUN apt-get update && apt-get install -y \ curl \ git \ nodejs \ npm \ && rm -rf /var/lib/apt/lists/*
RUN npm install -g pm2
ENV OPENVSCODE_SERVER_ROOT="/home/.openvscode-server"ENV OPENVSCODE="${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server"
USER openvscode-server
# # copy ms-vscode-remote.remote-ssh-0.99.2023032015.vsix file to container# COPY ms-vscode-remote.remote-ssh-0.99.2023032015.vsix /home/.openvscode-server/extensions/ms-vscode-remote.remote-ssh-0.99.2023032015.vsix# # install ms-vscode-remote.remote-ssh-0.99.2023032015.vsix# RUN ${OPENVSCODE} --install-extension /home/.openvscode-server/extensions/ms-vscode-remote.remote-ssh-0.99.2023032015.vsix
RUN ${OPENVSCODE} --install-extension njzy.stats-barRUN ${OPENVSCODE} --install-extension cweijan.vscode-ssh
EXPOSE 7860
ENTRYPOINT [ "/bin/sh", "-c", "exec ${OPENVSCODE} --host 0.0.0.0 --port 7860 --without-connection-token \"${@}\"", "--" ]
tests/Dockerfile coder.txtAdded+29
tests/Dockerfile gitpod.txtAdded+26
tests/WorkingAdded+26
tests/dockerfile 8-9Added+53
tests/working ext Dockerfile.txtAdded+29