How to configure debian 10 as a docker server

After try to install docker in LXC with proxmox ve, there will be some issues to make docker stop working. At last, I gave up and brance pure linux as docker sever.

Install debian 10 in promxox ve

Configure deiban 10 vm with ‘qemu-agent’ checked.

After install deiban 10

  • Change source list
mv /etc/apt/sources.list /etc/apt/sources.list.backup
wget -O /etc/apt/sources.list
apt update && apt -y dist-upgrade

apt install -y openssh-server git vim cloud-init apt-transport-https
sed -i 's/http/https/g' /etc/apt/sources.list
apt update && apt -y dist-upgrade

  • To fix perl error warning

option 1:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
#locale-gen en_US.UTF-8
cat >> /etc/environment <<EOF

option 2:

sudo echo "LC_ALL=en_US.UTF-8" >> /etc/environment
sudo echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
sudo echo "LANG=en_US.UTF-8" > /etc/locale.conf
sudo locale-gen en_US.UTF-8

vim setting


Install docker on debian 10

Step 1: Install Dependency packages

Start the installation by ensuring that all the packages used by docker as dependencies are installed.

sudo apt-get -y install \
   apt-transport-https \
   ca-certificates \
   curl \
   gnupg2 \

Step 2: Add docker’s offical GPG key:

Import Docker GPG key used for signing Docker packages:

curl -fsSL | sudo apt-key add -
apt-key fingerprint 0EBFCD88

Step 3: Add the docker repository to Debian 10

sudo add-apt-repository \
   "deb [arch=amd64] \
   $(lsb_release -cs) \

Step 4: Change docker repository to

sed -i 's/\/docker-ce/g' /etc/apt/sources.list

Step 5: Install docker and docker-compose on debian 10

apt update
apt -y install docker-ce docker-compose

Step 6: Chang docker hub mirrors to

cat << EOF > /etc/default/docker
systemctl restart docker

Change Some settings

Enable password authentication

sudo sed -i 's/PasswordAuthentication\ no/PasswordAuthentication\ yes/g' /etc/ssh/sshd_config
sudo systemctl daemon-reload
sudo systemctl restart sshd

Permit root can loing with password

sudo sed -i 's/#PermitRootLogin\ prohibit-password/PermitRootLogin\ yes/g' /etc/ssh/sshd_config
sudo systemctl daemon-reload
sudo systemctl restart sshd

Change machine-id

rm /var/lib/dbus/machine-id
truncate -s 0  /etc/machine-id
ln -s /etc/machine-id /var/lib/dbus/machine-id



  1. Cannot set LC_CTYPE to default locale: No such file or directory