Skip to content

Commit

Permalink
switch back to ubuntu base and install docker
Browse files Browse the repository at this point in the history
  • Loading branch information
v1nsai committed Dec 8, 2024
1 parent bfd09cc commit c6972db
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
8 changes: 4 additions & 4 deletions apps/services/devbox/app/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ spec:
kubernetes.io/hostname: bigrig
containers:
- name: devbox
# image: ubuntu:24.04
image: docker:dind
securityContext:
privileged: true
image: ubuntu:24.04
# image: docker:dind
# securityContext:
# privileged: true
# lifecycle:
# postStart:
# exec:
Expand Down
24 changes: 20 additions & 4 deletions apps/services/devbox/files/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -f /postinstall-has-run ]; then
fi

apt update
apt install -y openssh-server vim unminimize sudo nnn git
apt install -y openssh-server vim unminimize sudo nnn git wget
unminimize

# ssh
Expand All @@ -23,9 +23,25 @@ cp /authorized_keys /home/$USERNAME/.ssh/authorized_keys
chown $USERNAME:$USERNAME /home/$USERNAME/.ssh/authorized_keys
chmod 600 /home/$USERNAME/.ssh/authorized_keys

# node


# docker
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

# Node
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install 18
nvm use 18

# If everything runs successfully, don't bother running next startup
touch /postinstall-has-run

0 comments on commit c6972db

Please sign in to comment.