Docker:

curl -sSL https://get.docker.com | sh

Executing the Docker Command Without Sudo:

sudo usermod -aG docker ${USER}

Portainer:

docker run -d \
--name="portainer" \
--restart on-failure \
-p 9000:9000 \
-p 8000:8000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest