midnight-sons-images/code-server (sha256:931e7a687a8b72efc90d09f8d29a5650134f6e0f2008464a3038b8292876419d)
Published 2026-10-15 18:14:36 +00:00 by pedromctech
Installation
docker pull git.pedromc.tech/pedromctech/midnight-sons-images/code-server@sha256:931e7a687a8b72efc90d09f8d29a5650134f6e0f2008464a3038b8292876419dsha256:931e7a687a8b72efc90d09f8d29a5650134f6e0f2008464a3038b8292876419dImage layers
| # debian.sh --arch 'arm64' out/ 'trixie' '@1791158400' |
| RUN /bin/sh -c apt-get update && apt-get install -y curl dumb-init git git-lfs htop locales lsb-release man-db nano openssh-client procps sudo vim-tiny wget zsh && 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 if grep -q 1000 /etc/passwd; then userdel -r "$(id -un 1000)"; fi && 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.6.0/fixuid-0.6.0-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 NVM_VERSION=v0.40.3 |
| ARG NODE_VERSION=22 |
| ARG OPENCODE_VERSION=1.18.35 |
| ENV NVM_DIR=/opt/nvm |
| ENV ZDOTDIR=/opt/zsh-config |
| ENV SHELL=/usr/bin/zsh |
| RUN |3 NVM_VERSION=v0.40.3 NODE_VERSION=22 OPENCODE_VERSION=1.18.35 /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends bash build-essential ca-certificates curl file fd-find git git-lfs gnupg jq less libffi-dev libssl-dev lsof make nano openssh-client pkg-config procps python3 python3-dev python3-pip python3-venv ripgrep sudo unzip zip xz-utils zsh; ln -sf /usr/bin/fdfind /usr/local/bin/fd; git lfs install --system; install -d -m 0755 /usr/share/keyrings; curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg; echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list; apt-get update; apt-get install -y --no-install-recommends google-cloud-cli; rm -rf /var/lib/apt/lists/* # buildkit |
| RUN |3 NVM_VERSION=v0.40.3 NODE_VERSION=22 OPENCODE_VERSION=1.18.35 /bin/sh -c set -eux; case "$(dpkg --print-architecture)" in amd64) AWS_ARCH=x86_64 ;; arm64) AWS_ARCH=aarch64 ;; *) echo "Arquitectura no soportada por este Dockerfile"; exit 1 ;; esac; curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-${AWS_ARCH}.zip" -o /tmp/awscliv2.zip; unzip -q /tmp/awscliv2.zip -d /tmp; /tmp/aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli; rm -rf /tmp/aws /tmp/awscliv2.zip # buildkit |
| RUN |3 NVM_VERSION=v0.40.3 NODE_VERSION=22 OPENCODE_VERSION=1.18.35 /bin/sh -c mkdir -p "${NVM_DIR}" && curl -fsSL "https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh" | bash # buildkit |
| RUN |3 NVM_VERSION=v0.40.3 NODE_VERSION=22 OPENCODE_VERSION=1.18.35 /bin/sh -c bash -e -c ' source "$NVM_DIR/nvm.sh"; nvm install "$NODE_VERSION"; nvm alias default "$NODE_VERSION"; nvm use default; npm install --global "opencode-ai@${OPENCODE_VERSION}"; NODE_BIN="$(dirname "$(nvm which default)")"; ln -sf "${NODE_BIN}/node" /usr/local/bin/node; ln -sf "${NODE_BIN}/npm" /usr/local/bin/npm; ln -sf "${NODE_BIN}/npx" /usr/local/bin/npx; ln -sf "${NODE_BIN}/opencode" /usr/local/bin/opencode; chown -R coder:coder "$NVM_DIR"' # buildkit |
| RUN |3 NVM_VERSION=v0.40.3 NODE_VERSION=22 OPENCODE_VERSION=1.18.35 /bin/sh -c set -eux; git clone --depth=1 https://github.com/ohmyzsh/ohmyzsh.git /opt/oh-my-zsh; git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions.git /opt/oh-my-zsh/custom/plugins/zsh-autosuggestions; git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git /opt/oh-my-zsh/custom/plugins/zsh-syntax-highlighting; mkdir -p "${ZDOTDIR}" # buildkit |
| RUN |3 NVM_VERSION=v0.40.3 NODE_VERSION=22 OPENCODE_VERSION=1.18.35 /bin/sh -c cat > /opt/zsh-config/.zshrc <<'EOF' export ZSH=/opt/oh-my-zsh export ZSH_CUSTOM=/opt/oh-my-zsh/custom export NVM_DIR=/opt/nvm [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" ZSH_THEME="bira" DISABLE_AUTO_UPDATE="true" plugins=( ansible aws azure docker docker-compose dotenv gcloud git gradle helm history kubectl lxd multipass mvn nmap node nodenv npm nvm opentofu pip pipenv podman poetry postgres redis-cli rsync rust snap ssh sudo systemd tailscale themes ubuntu ufw vagrant vscode yarn zsh-autosuggestions zsh-syntax-highlighting ) source "$ZSH/oh-my-zsh.sh" EOF # buildkit |
| RUN |3 NVM_VERSION=v0.40.3 NODE_VERSION=22 OPENCODE_VERSION=1.18.35 /bin/sh -c chmod 0644 /opt/zsh-config/.zshrc && usermod --shell /usr/bin/zsh coder # buildkit |
| USER coder |
| WORKDIR /workspace |