From 5e380140920b349de372b5d0164bd946d2c867ab Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 5 May 2020 12:30:27 +0300 Subject: [PATCH] Add user docker config file. Make docker ps command more readable --- README.md | 5 ++++- config.json | 3 +++ install-docker.sh | 11 ++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 config.json diff --git a/README.md b/README.md index dc7a75e..2db3950 100644 --- a/README.md +++ b/README.md @@ -57,4 +57,7 @@ LC_ALL=C.UTF-8 ## Production docker version docker -v -Docker version 19.03.5, build 633a0ea838 \ No newline at end of file +Docker version 19.03.5, build 633a0ea838 + +## Set UTC timezone +`sudo timedatectl set-timezone UTC` \ No newline at end of file diff --git a/config.json b/config.json new file mode 100644 index 0000000..ccd082c --- /dev/null +++ b/config.json @@ -0,0 +1,3 @@ +{ + "psFormat": "table {{.Names}} \\t{{.Command}}\\t{{.Ports}}\\t{{.Status}}" +} \ No newline at end of file diff --git a/install-docker.sh b/install-docker.sh index 5f643f6..71063af 100755 --- a/install-docker.sh +++ b/install-docker.sh @@ -25,16 +25,25 @@ sudo apt-get update #sudo apt-get install -y docker-ce=18.06.3~ce~3-0~ubuntu # New production version -sudo apt-get install docker-ce=5:19.03.5~3-0~ubuntu-bionic docker-ce-cli=5:19.03.5~3-0~ubuntu-bionic containerd.io +sudo apt-get install -y \ + docker-ce=5:19.03.5~3-0~ubuntu-bionic \ + docker-ce-cli=5:19.03.5~3-0~ubuntu-bionic \ + containerd.io sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose +mkdir -p ~/.docker +cp config.json ~/.docker + + if [ ! -f ~/.ssh/id_rsa ]; then ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/id_rsa fi +touch ~/.ssh/authorized_keys + echo "-----------------------" cat ~/.ssh/id_rsa.pub \ No newline at end of file