- 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-loginChanging 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 sshdFail2ban
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 fail2banInstall 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
dockerRelated Posts
Continue reading with these related articles
10 min read
When Parallel Coding Agents Crash Your Workstation
What took down a 60 GiB Linux workstation running parallel Claude Code and Codex sessions, how to find what ate the memory, and five guardrails that stopped it.
claude-codeai-workflowsubuntu
+2 more
Read article
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 .Net 0
Azure Deployment for .Net - Introduction - Prerequisites
This is the introduction to the Azure Deployment for .Net series.
azuredotnetgithub
+10 more
Read article