midnight-sons-images/dev-server (sha256:c79b8c6f82c1c2fc41ad6ed4150adab35e88adb80446a3a34446c885c3317fc6)

Published 2026-10-22 01:51:17 +00:00 by pedromctech

Installation

docker pull git.pedromc.tech/pedromctech/midnight-sons-images/dev-server@sha256:c79b8c6f82c1c2fc41ad6ed4150adab35e88adb80446a3a34446c885c3317fc6
sha256:c79b8c6f82c1c2fc41ad6ed4150adab35e88adb80446a3a34446c885c3317fc6

Image layers

# debian.sh --arch 'arm64' out/ 'trixie' '@1792531975'
USER root
ARG NVM_VERSION=v0.40.8
ARG NODE_VERSION=22
ARG OPENCODE_VERSION=2.0.32
ENV NVM_DIR=/opt/nvm HOME=/home/coder USER=coder SHELL=/usr/bin/zsh LANG=en_US.UTF-8
RUN |3 NVM_VERSION=v0.40.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends ansible bash build-essential ca-certificates curl fd-find file git git-lfs gnupg jq less libatomic1 libffi-dev libgcc-s1 libssl-dev libstdc++6 locales lsof make nano nmap openssh-client openssh-server pipx pkg-config postgresql-client procps python3 python3-dev python3-pip python3-venv redis-tools ripgrep rsync sudo supervisor tmux unzip zip xz-utils zsh; sed -i 's/^# *en_US.UTF-8 UTF-8$/en_US.UTF-8 UTF-8/' /etc/locale.gen; locale-gen en_US.UTF-8; update-locale LANG=en_US.UTF-8; ln -sf /usr/bin/fdfind /usr/local/bin/fd; git lfs install --system; install -d -m 0755 /usr/share/keyrings /etc/apt/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; curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg; DOCKER_ARCH="$(dpkg --print-architecture)"; DOCKER_CODENAME="$({ . /etc/os-release; echo "$VERSION_CODENAME"; })"; echo "deb [arch=${DOCKER_ARCH} signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian ${DOCKER_CODENAME} stable" > /etc/apt/sources.list.d/docker.list; curl -fsSL https://get.opentofu.org/opentofu.gpg -o /etc/apt/keyrings/opentofu.gpg; curl -fsSL https://packages.opentofu.org/opentofu/tofu/gpgkey -o /tmp/opentofu-repo.gpg; gpg --no-tty --batch --yes --dearmor -o /etc/apt/keyrings/opentofu-repo.gpg /tmp/opentofu-repo.gpg; rm -f /tmp/opentofu-repo.gpg; chmod a+r /etc/apt/keyrings/opentofu.gpg /etc/apt/keyrings/opentofu-repo.gpg; printf '%s\n' "deb [signed-by=/etc/apt/keyrings/opentofu.gpg,/etc/apt/keyrings/opentofu-repo.gpg] https://packages.opentofu.org/opentofu/tofu/any/ any main" "deb-src [signed-by=/etc/apt/keyrings/opentofu.gpg,/etc/apt/keyrings/opentofu-repo.gpg] https://packages.opentofu.org/opentofu/tofu/any/ any main" > /etc/apt/sources.list.d/opentofu.list; chmod a+r /etc/apt/sources.list.d/opentofu.list; apt-get update; apt-get install -y --no-install-recommends docker-ce-cli docker-compose-plugin google-cloud-cli tofu; rm -rf /var/lib/apt/lists/* # buildkit
RUN |3 NVM_VERSION=v0.40.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /bin/sh -c set -eux; useradd --create-home --shell /usr/bin/zsh coder; passwd -d coder; chage -I -1 -m 0 -M 99999 -E -1 coder; install -d -o coder -g coder -m 0755 /workspace; install -d -m 0755 /var/lib/dev-ssh-hostkeys /run/sshd # buildkit
RUN |3 NVM_VERSION=v0.40.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /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.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /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.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /bin/sh -c bash -e -c ' source "$NVM_DIR/nvm.sh"; nvm install "$NODE_VERSION"; nvm alias default "$NODE_VERSION"; nvm use default; 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; chown -R coder:coder "$NVM_DIR"' # buildkit
RUN |3 NVM_VERSION=v0.40.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /bin/sh -c set -eux; mkdir -p /opt/opencode-install; curl -fsSL https://opencode.ai/v2/install -o /tmp/opencode-install.sh; HOME=/opt/opencode-install bash /tmp/opencode-install.sh --version "${OPENCODE_VERSION}" --no-modify-path; install -m 0755 /opt/opencode-install/.opencode/bin/opencode /usr/local/bin/opencode; rm -rf /opt/opencode-install /tmp/opencode-install.sh # buildkit
RUN |3 NVM_VERSION=v0.40.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /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 # buildkit
RUN |3 NVM_VERSION=v0.40.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /bin/sh -c cat > /etc/ssh/sshd_config <<'EOF' Port 22 HostKey /var/lib/dev-ssh-hostkeys/ssh_host_ed25519_key PidFile /run/sshd.pid AuthorizedKeysFile .ssh/authorized_keys PermitRootLogin no PasswordAuthentication no KbdInteractiveAuthentication no PubkeyAuthentication yes AuthenticationMethods publickey PermitEmptyPasswords no AllowUsers coder StrictModes yes AllowTcpForwarding yes AllowAgentForwarding no X11Forwarding no PermitTunnel no PermitUserEnvironment no UsePAM no PrintMotd no LogLevel VERBOSE Subsystem sftp internal-sftp EOF # buildkit
RUN |3 NVM_VERSION=v0.40.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /bin/sh -c cat > /usr/local/sbin/dev-entrypoint <<'EOF' #!/bin/sh set -eu : "${SSH_AUTHORIZED_KEYS:?Configura SSH_AUTHORIZED_KEYS con tu clave pública}" chown coder:coder /home/coder # Claves SSH autorizadas. install -d -o coder -g coder -m 0700 /home/coder/.ssh printf '%s\n' "$SSH_AUTHORIZED_KEYS" > /home/coder/.ssh/authorized_keys chown coder:coder /home/coder/.ssh/authorized_keys chmod 0600 /home/coder/.ssh/authorized_keys # Inicializar .zshrc en el HOME persistente si no existe. if [ ! -f /home/coder/.zshrc ]; then cat << 'ZSHRC' > /home/coder/.zshrc 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" ZSHRC chown coder:coder /home/coder/.zshrc chmod 0644 /home/coder/.zshrc fi # Claves de host SSH. install -d -o root -g root -m 0700 /var/lib/dev-ssh-hostkeys if [ ! -s /var/lib/dev-ssh-hostkeys/ssh_host_ed25519_key ]; then ssh-keygen -q -t ed25519 -N '' \ -f /var/lib/dev-ssh-hostkeys/ssh_host_ed25519_key fi chown root:root /var/lib/dev-ssh-hostkeys/ssh_host_ed25519_key* chmod 0600 /var/lib/dev-ssh-hostkeys/ssh_host_ed25519_key chmod 0644 /var/lib/dev-ssh-hostkeys/ssh_host_ed25519_key.pub install -d -m 0755 /run/sshd /usr/sbin/sshd -t -f /etc/ssh/sshd_config exec /usr/bin/supervisord -n -c /etc/supervisor/conf.d/dev.conf EOF # buildkit
RUN |3 NVM_VERSION=v0.40.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /bin/sh -c chmod 0755 /usr/local/sbin/dev-entrypoint # buildkit
RUN |3 NVM_VERSION=v0.40.8 NODE_VERSION=22 OPENCODE_VERSION=2.0.32 /bin/sh -c cat > /etc/supervisor/conf.d/dev.conf <<'EOF' [supervisord] nodaemon=true logfile=/dev/null pidfile=/run/supervisord.pid [program:sshd] command=/usr/sbin/sshd -D -e -f /etc/ssh/sshd_config autostart=true autorestart=true startsecs=1 priority=10 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:opencode-serve] command=/usr/local/bin/opencode serve --hostname 0.0.0.0 --port 4096 directory=/workspace user=coder autostart=true autorestart=true startsecs=5 priority=20 stopasgroup=true killasgroup=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 EOF # buildkit
WORKDIR /workspace
EXPOSE [22/tcp 4096/tcp]
ENTRYPOINT ["/usr/local/sbin/dev-entrypoint"]
Details
Container
2026-10-22 01:51:17 +00:00
1
OCI / Docker
linux/arm64
821 MiB
Versions (1) View all
latest 2026-10-22