code-server (2)
Published 2023-01-23 22:26:48 +08:00 by eason
Installation
docker pull gitea.easonabc.eu.org/eason/code-server:2
sha256:145e604ed320c2f6895f7ac780e68de1f6a663f5fe9d2ff66869bb4804c5bf3c
Image Layers
ADD file:b1e7652678bbfc9556636e77d79c947ff1436888e2929f9c5c3ddb42a50c1176 in / |
CMD ["bash"] |
RUN /bin/sh -c apt-get update && apt-get install -y curl dumb-init zsh htop locales man nano git git-lfs procps openssh-client sudo vim.tiny lsb-release && git lfs install && rm -rf /var/lib/apt/lists/* # buildkit |
RUN /bin/sh -c sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen # buildkit |
ENV LANG=en_US.UTF-8 |
RUN /bin/sh -c adduser --gecos '' --disabled-password coder && echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd # buildkit |
RUN /bin/sh -c ARCH="$(dpkg --print-architecture)" && curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.5/fixuid-0.5-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - && chown root:root /usr/local/bin/fixuid && chmod 4755 /usr/local/bin/fixuid && mkdir -p /etc/fixuid && printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml # buildkit |
COPY ci/release-image/entrypoint.sh /usr/bin/entrypoint.sh # buildkit |
RUN /bin/sh -c dpkg -i /tmp/packages/code-server*$(dpkg --print-architecture).deb # buildkit |
ENV ENTRYPOINTD=/entrypoint.d |
EXPOSE map[8080/tcp:{}] |
USER 1000 |
ENV USER=coder |
WORKDIR /home/coder |
ENTRYPOINT ["/usr/bin/entrypoint.sh" "--bind-addr" "0.0.0.0:8080" "."] |
USER root |
ARG ARCH |
WORKDIR /setup-app |
/bin/sh -c apt update |
/bin/sh -c sudo mkdir -p /etc/apt/keyrings |
/bin/sh -c sudo apt install --quiet -y ca-certificates curl gnupg lsb-release |
/bin/sh -c curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
/bin/sh -c echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
/bin/sh -c apt update |
/bin/sh -c apt install --quiet -y software-properties-common |
/bin/sh -c apt install --quiet -y fish screen npm docker.io fish build-essential openssl libssl-dev pkg-config lld clang musl-tools tree netcat autoconf python3-pip protobuf-compiler libprotobuf-dev lua5.2 docker-compose-plugin linux-perf |
WORKDIR /setup-app |
COPY dir:4423275c04044e66b2dcfd5d0060a3e5e5df45cccde84415364e2c9ba35eee42 in ./setup |
/bin/sh -c curl https://sh.rustup.rs -o rustup.sh |
/bin/sh -c sh rustup.sh --default-toolchain none -y |
/bin/sh -c /root/.cargo/bin/rustup install 1.65.0 |
/bin/sh -c /root/.cargo/bin/rustup target add wasm32-unknown-unknown |
/bin/sh -c mv ./setup/cargo-bin/* /root/.cargo/bin |
ARG GIT_NAME |
ARG GIT_EMAIL |
/bin/sh -c git config --global user.name "${GIT_NAME}" |
/bin/sh -c git config --global user.email "${GIT_EMAIL}" |
/bin/sh -c sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && exit |
/bin/sh -c git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git /opt/zsh-autocomplete |
/bin/sh -c git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions |
/bin/sh -c cp ./setup/zsh/.zshrc /root/.zshrc |
/bin/sh -c echo "alias code=code-server" >> ~/.oh-my-zsh/custom/code.zsh |
/bin/sh -c echo "alias python=/usr/bin/python3" >> ~/.oh-my-zsh/custom/code.zsh |
/bin/sh -c curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash |
/bin/sh -c echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' > ~/.oh-my-zsh/custom/nvm.zsh |
/bin/sh -c echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.oh-my-zsh/custom/nvm.zsh |
/bin/sh -c cp /usr/bin/perf_5.10 /usr/bin/perf_5.15 |
WORKDIR / |
/bin/sh -c rm -r /setup-app |