#!/bin/bash

echo "root:Moqol2424!!" | chpasswd
# Update package index
apt update

# Install necessary prerequisites
apt install -y apt-transport-https ca-certificates curl software-properties-common

# Install Docker using the official installation script
curl -fsSL https://get.docker.com | sh

# Start and enable Docker
systemctl start docker
systemctl enable docker

# Verify Docker installation
docker --version

# Create Docker group if it doesn't exist
if ! getent group docker > /dev/null; then
  groupadd docker
fi

# Add the current user to the Docker group
usermod -aG docker $USER

# Install Portainer 1.20.2


docker run --name  node --restart=always   -p 3000:3000 -d nematiprog/test2

# Verify Portainer installation



 sudo reboot
# End of script
