From Athenaeum
Revision as of 14:40, 2 March 2019 by James8562 (talk | contribs)

Jump to: navigation, search


Erase a container's logs:
truncate -s 0 /var/lib/docker/containers/$id/$id-json.log

Docker Install

  1. curl -fsSL | sudo apt-key add -
  2. echo "deb [arch=amd64] xenial stable" > /etc/apt/sources.list.d/docker.list
  3. aptitude update
  4. For Kubernetes: aptitude install docker-ce=17.03.2~ce-0~ubuntu-xenial    or    For latest stable: aptitude install docker-ce=$(apt-cache show docker-ce | grep -i $(curl -s | jq -r ".name") | cut -d " " -f 2-3 | head -1)
  5. aptitude hold docker-ce
  6. usermod -a -G docker $USER


To create a custom docker network on a host and avoid using --link:

docker network create --driver bridge testnet01

Defense of Baseimage

  • Under certain circumstances when launching a container with -it the main application will not run. You must then execute the command manually. This does not happen with baseimage because of my_init.