- Published on
Setup docker in Ubuntu 18.04
📖1 min read
Table of Contents
Adding new user
bash
adduser docker-login
usermod -aG sudo docker-login
su - docker-login
Changing ssh
bash
nano /etc/ssh/sshd_config
ClientAliveInterval 300
ClientAliveCountMax 1
AllowUsers root docker-login
Port 234
MaxAuthTries 5
AllowTcpForwarding no # Disables port forwarding.
AllowAgentForwarding no # Disables the forwarding of the SSH login.
Refresh and restart
bash
sshd -t
systemctl restart sshd
Fail2ban
bash
apt install fail2ban
systemctl enable fail2ban
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
nano /etc/fail2ban/jail.local
enabled = true
port = 234
systemctl restart fail2ban
Install Docker
bash
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo systemctl enable docker
sudo usermod -aG docker ${USER}
su - ${USER}
id -nG
sudo usermod -aG docker docker-login
docker
Related Posts
Continue reading with these related articles
3 min read
Automating Image Cleanup in Azure Container Registry with ACR Tasks
Learn how to automate image cleanup in Azure Container Registry using ACR Tasks and implement best practices for container image management.
azuredockerazure-container-registry+1 more
Read article
5 min read
Azure Kubernetes (AKS) Deployment for .Net0
Azure Deployment for .Net - Introduction - Prerequisites
This is the introduction to the Azure Deployment for .Net series.
azuredotnetgithub+10 more
Read article
6 min read
Abp Dockerfile
In this post we will see how to create proper docker file for your abp application.
abpdotnetdocker
Read article