updated docker and essentials scripts

This commit is contained in:
2024-02-28 14:24:59 -06:00
parent 6835ef3185
commit 52d5407202
2 changed files with 23 additions and 5 deletions

View File

@@ -104,7 +104,9 @@ git config --global user.email "akanealw@gmail.com"
git config --global init.defaultBranch main
# show ip in /etc/issue
wget -qO /etc/issue.default http://192.168.1.50/files/debian/issue.default
if [[ ! -f /etc/issue.default ]]
then wget -qO /etc/issue.default http://192.168.1.50/files/debian/issue.default
fi
rm /etc/issue > /dev/null 2>&1
cp /etc/issue.default /etc/issue
name=$(basename /sys/class/net/e*)
@@ -113,14 +115,18 @@ echo "$name: \4{$name}" >> /etc/issue
echo "" >> /etc/issue
# set input preferences
wget -qO /etc/inputrc.default http://192.168.1.50/files/debian/inputrc.default
if [[ ! -f /etc/inputrc.default ]]
then wget -qO /etc/inputrc.default http://192.168.1.50/files/debian/inputrc.default
fi
rm /etc/inputrc > /dev/null 2>&1
cp /etc/inputrc.default /etc/inputrc
echo "" >> /etc/inputrc
echo "set completion-ignore-case On" >> /etc/inputrc
# set bash preferences and aliases
wget -qO /etc/bash.bashrc http://192.168.1.50/files/debian/bash.bashrc.default
if [[ ! -f /etc/bash.bashrc.default ]]
then wget -qO /etc/bash.bashrc.default http://192.168.1.50/files/debian/bash.bashrc.default
fi
echo "" >> /etc/bash.bashrc
echo "# custom settings and aliases" >> /etc/bash.bashrc
echo "set -o noclobber" >> /etc/bash.bashrc

View File

@@ -19,12 +19,24 @@ if [[ ! -f /etc/apt/keyrings/docker.gpg ]]
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
groupadd docker > /dev/null 2>&1
usermod -aG docker akanealw
curl -s https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
mv /root/.local/bin/lazydocker /usr/local/bin
systemctl enable docker.service
systemctl enable containerd.service
systemctl start docker.service
systemctl start containerd.service
systemctl status docker.service
systemctl status containerd.service
echo "alias dc='docker compose'" >> /etc/bash.bashrc
echo "alias dcup='docker compose up -d'" >> /etc/bash.bashrc
echo "alias dcdown='docker compose down'" >> /etc/bash.bashrc
echo "alias dcpull='docker compose pull'" >> /etc/bash.bashrc
echo "alias dps='docker ps'" >> /etc/bash.bashrc
echo "alias dstart='docker start'" >> /etc/bash.bashrc
echo "alias dstop='docker stop'" >> /etc/bash.bashrc
echo "alias drestart='docker restart'" >> /etc/bash.bashrc
echo "alias dlf='docker logs -f'" >> /etc/bash.bashrc
echo "alias dipaf='docker image prune -a -f'" >> /etc/bash.bashrc
echo "alias deit='docker exec -it'" >> /etc/bash.bashrc
echo "alias lzd='lazydocker'" >> /etc/bash.bashrc
echo "Docker installed successfully."
else
echo "Docker is already configured."