Skip to content

Instantly share code, notes, and snippets.

@narenaryan
Created August 18, 2025 01:04
Show Gist options
  • Select an option

  • Save narenaryan/4dd884dc985d22480d81b20a76522602 to your computer and use it in GitHub Desktop.

Select an option

Save narenaryan/4dd884dc985d22480d81b20a76522602 to your computer and use it in GitHub Desktop.
An essential setup script for ubuntu-based containers
#!/bin/bash
# Update package lists
apt-get update
# Install essential development tools
apt-get install -y \
build-essential \
git \
curl \
wget \
vim \
nano \
unzip \
zip \
ca-certificates \
gnupg \
lsb-release
# Install Node.js and npm
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
apt-get install -y nodejs
# Install Python and pip
apt-get install -y \
python3 \
python3-pip \
python3-venv
# Install Docker CLI (for containers that need Docker)
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install -y docker-ce-cli
# Install Go
GO_VERSION="1.21.0"
wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
rm go${GO_VERSION}.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile
# Clean up
apt-get clean
rm -rf /var/lib/apt/lists/*
echo "Development tools installation complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment