Showing posts with label Docker. Show all posts
Showing posts with label Docker. Show all posts

Tuesday, May 9, 2023

Thursday, May 19, 2016

Add local registry mirror to docker daemon on systemd ubuntu (after 15.04)

After docker installation, follow this steps

  • Create directory /etc/systemd/system/docker.service.d if not exist
  • Create mirror.conf file inside that directory. The name "mirror" can be changed to anything.
  • In the file, add this lines
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --registry-mirror=http://registry-host:registry-port
  • registry-host is hostname/ip of your local registry mirror
  • registry-port is port of your local registry mirror
  • Flush the change with $ sudo systemctl daemon-reload
  • Restart docker with $ sudo systemctl restart docker
  • Check if the change is successfully applied with $ systemctl status docker,  your config should appear somewhere in the command output.
Tested on Docker 1.11, Ubuntu 15.10 & 16.04

If you want more explanations about these commands, please refer to follow links. Thank you for all of them for providing me a direction to solve the issue and also come up with this post.

Thursday, May 12, 2016

Delete unused (orphaned) Docker volume

Since Docker 1.9, there's an easy way to find unused volumes and delete them.

To list unused volumes, use this command

$ docker volume ls -qf dangling=true

To delete them, use

$ docker volume rm $(docker volume ls -qf dangling=true)

Credit: I copied the whole thing from this SO answer

Tuesday, April 26, 2016

Set daemon config for Docker for Mac

Just follow what describe in this link How to run a insecure-registry

Capture the screen in case the link is gone in the future


Friday, March 27, 2015

Set bash completion when aliasing docker to d

After you installed docker bash completion, either by sourcing it from your .bash_profile or installing it to bash-completion, add this line to the end of your docker-completion.sh file.
complete -F _docker d
Reload your shell. And that's it!

Note: change the last d to other character you aliased docker to

Wednesday, January 7, 2015

[Docker] Look inside running container

docker exec -t -i <container-name> /bin/bash

For looking inside an image, use

docker run -t -i <image-name> /bin/bash

Collectd PostgreSQL Plugin

I couldn't find this link when searching with google https://www.collectd.org/documentation/manpages/collectd.conf.html#plugin-postgresq...