From 3bf77906b85e5bccadbe23c4f18036101490ec89 Mon Sep 17 00:00:00 2001 From: doctor_ew Date: Sun, 8 Dec 2024 12:42:10 -0500 Subject: [PATCH] forgot to update postinstall configmap --- apps/services/devbox/app/configmap.yaml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/services/devbox/app/configmap.yaml b/apps/services/devbox/app/configmap.yaml index d5f7276..7562d58 100644 --- a/apps/services/devbox/app/configmap.yaml +++ b/apps/services/devbox/app/configmap.yaml @@ -3,13 +3,21 @@ data: postinstall.sh: "#!/bin/bash\n\nset -e\n\n# if the file /postinstall-has-run exists, then the postinstall script has already run and exit gracefully\nif [ -f /postinstall-has-run ]; then\n exit 0\nfi\n\napt update\napt install -y openssh-server vim unminimize - sudo nnn git\nunminimize\n\n# ssh\necho \"PermitRootLogin no\" >> /etc/ssh/sshd_config\necho - \"PasswordAuthentication no\" >> /etc/ssh/sshd_config\nservice ssh restart\n\n# - user\nadduser --disabled-password --gecos \"\" $USERNAME\necho \"$USERNAME ALL=(ALL) - NOPASSWD:ALL\" >> /etc/sudoers\ncp /authorized_keys /home/$USERNAME/.ssh/authorized_keys\nchown + sudo nnn git wget\necho -e \"y\\n\" | unminimize\n\n# ssh\necho \"PermitRootLogin + no\" >> /etc/ssh/sshd_config\necho \"PasswordAuthentication no\" >> /etc/ssh/sshd_config\nservice + ssh restart\n\n# user\nadduser --disabled-password --gecos \"\" $USERNAME\necho + \"$USERNAME ALL=(ALL) NOPASSWD:ALL\" >> /etc/sudoers\ncp /authorized_keys /home/$USERNAME/.ssh/authorized_keys\nchown $USERNAME:$USERNAME /home/$USERNAME/.ssh/authorized_keys\nchmod 600 /home/$USERNAME/.ssh/authorized_keys\n\n# - node \n\n\n\n# If everything runs successfully, don't bother running next startup\ntouch - /postinstall-has-run" + docker\n# Add Docker's official GPG key:\nsudo apt-get update\nsudo apt-get install + ca-certificates curl\nsudo install -m 0755 -d /etc/apt/keyrings\nsudo curl -fsSL + https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc\nsudo + chmod a+r /etc/apt/keyrings/docker.asc\n\n# Add the repository to Apt sources:\necho + \\\n \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] + https://download.docker.com/linux/ubuntu \\\n $(. /etc/os-release && echo \"$VERSION_CODENAME\") + stable\" | \\\n sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nsudo + apt-get update \n\n# Node\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh + | bash\nnvm install 18\nnvm use 18\n\n# If everything runs successfully, don't + bother running next startup\ntouch /postinstall-has-run" kind: ConfigMap metadata: creationTimestamp: null