recentpopularlog in

kme : docker   119

« earlier  
Add a quiet option to docker pull · Issue #13588 · moby/moby
And I can't get it on macOS 10.11, of course, but simply redirecting stderr or closing it works:
<code class="language-bash">docker run --rm bash:$tag bash -c "shopt | grep -q $option" 2>&-</code>
docker  cli  annoyance  workaround  solution 
7 weeks ago by kme
How to list all tags of a docker image
This is one way to do this, and it works. See also this Gist, which 'docker pulls' a bunch of Bash images to see if that version of Bash has a certain 'shopt' option:
<code class="language-bash">
for (( i=0; $?==0; i++ )); do
curl -sL$image/tags/?page=$i 2>/dev/null \
| jq -r '.results[]["name"]'
You can also get the total number of tags from the "count" attribute of the first JSON response, which also gives you the "next" URL.

Possibly see also:, but I don't know what the difference between Docker Hub, Docker Registry, and a Docker "Trusted" Registry is, or which one exactly the public Docker Hub is.
docker  cli  commandline  containers  automation  sysadmin  solution 
7 weeks ago by kme
docker - Setting the hostname for a container running in Kubernetes - Stack Overflow
Yeah, no, with a CentOS 7 docker image, after it's already running, it doesn't look like you can change the hostname, because you get the "hostname: you must be root to change the host name" even when you're (obviously) running as root.
centos  centos7  docker  sysadmin  hostname  almostsolution 
june 2019 by kme
How do you attach and detach from Docker's process? - Stack Overflow
To detach the tty without exiting the shell, use the escape sequence Ctrl-p Ctrl-q.

more details here:

additional info from this source (!msg/docker-user/nWXAnyLP9-M/kbv-FZpF4rUJ):

* docker run -t -i → can be detached with ^P^Qand reattached with docker attach
* docker run -i → cannot be detached with ^P^Q; will disrupt stdin
* docker run → cannot be detached with ^P^Q; can SIGKILL client; can reattach with docker attach
docker  commandline  tipsandtricks  solution  fuckina 
june 2019 by kme
docker attach | Docker Documentation
To stop a container, use CTRL-c. This key sequence sends SIGKILL to the container. If --sig-proxy is true (the default), CTRL-c sends a SIGINT to the container. You can detach from a container and leave it running using the CTRL-p CTRL-q key sequence.
docker  commandline  reference 
june 2019 by kme
Docker and Locales
Like, in my case, Vim wasn't displaying UTF-8 encoded symbols (like "»") correctly.

Here's his working Dockerfile recipe:
<code>FROM ubuntu:13.10

# Set the locale
RUN locale-gen en_US.UTF-8
docker  locale  characterencoding  errormessage  annoyance  solution 
june 2019 by kme
systemctl failed to get Dbus connection: No connection to service manager
It seems like a hot ticket, but this doesn't work if 'systemctl' depends on D-Bus being running. It's a total chicken-and-egg problem then. This is the case in the official Docker image for CentOS 7.

<code class="language-bash">sudo systemctl start dbus.service</code>
centos7  centos  docker  systemctl  systemd  dbus  annoyance 
june 2019 by kme
yum - How to add language support on CentOS 7 (on Docker)? - Server Fault
If they'd just stop saying 'localectl' is the solution, when it doesn't work in Docker. There's no DBus daemon running or something. The 'systemctl' command doesn't work, even. These things are stripped out in container environments, I guess.

What *actually* works is
<code class="language-bash">yum reinstall -y glibc-common</code>
and then setting 'LC_ALL` or 'LANG` in the environment.
centos  centos7  locale  docker  language  characterencoding  maybesolution 
june 2019 by kme
How to Set Up System Locale on CentOS 7 | RoseHosting
I think 'localectl' is not built into the base CentOS 7 OS or something? Or at least not the Docker image? Because, sure enough, it wasn't there before, and after a 'yum update' it is.

For a CentOS 7 Docker image, however, you still need to 'yum reinstall -y glibc-common' and just set 'LC_ALL' or 'LANG' in your environment; the 'localectl' command won't work because there's no D-Bus daemon running on the Docker image.
centos  locale  language  sysadmin  sortof  solution  docker 
june 2019 by kme
windows - How to fix PuTTY showing garbled characters? - Server Fault
The analogous fix on CentOS (7) is to use 'localectl', maybe, except that requires DBus to be running, which it isn't for a fresh-out-of-the-box Docker container. ¯\_(ツ)_/¯
If the locale returns something like POSIX, issue
<code class="language-bash">update-locale LANG=en_US.utf8</code>
at the command line - see – koppor Dec 19 '15 at 11:05
docker  utf8  characterencoding  locale  mojibake  terminal  unix  shell  ubuntu  solution  centos  sortof 
june 2019 by kme
dns - Network calls fail during image build on corporate network - Stack Overflow |
I was able to figure out the issue. On Ubuntu, Docker sets the DNS servers for container to Google's servers at 8.8.8.x. As I understand it, this is a workaround on Ubuntu due to the fact that Ubuntu sets /etc/resolv.conf to be

Those Google servers weren't accessible from behind our firewall, which is why we couldn't resolve any URLs.

The fix is to tell Docker which DNS servers to use. This fix depends on how you installed Docker:
Ubuntu Package

If you have the Ubuntu package installed, edit /etc/default/docker and add the following line:
<code class="language-bash">
DOCKER_OPTS="--dns <your_dns_server_1> --dns <your_dns_server_2>"

You can add as many DNS servers as you want to this config. Once you've edited this file you'll want to restart your Docker service:
<code class="language-bash">
sudo service docker restart
docker  dns  corporatenetwork  bullshit  workaround  fuckina  solution 
february 2019 by kme
What is the difference between the Docker Engine and Docker Daemon? - Quora |
Docker Daemon checks the client request and communicates with the Docker components in order to perform a service whereas, Docker Engine or Docker is the base engine installed on your host machine to build and run containers using Docker components and services

But is this right?
docker engine and daemon are the names used interchangeably. It refers to the same entity.
docker  terminology  lingo  containerization  solution 
january 2019 by kme
add a docker configuration file · Issue #937 · moby/moby |
Answer: there apparently is no '/etc/docker/docker.conf'; on Debian-derived distros, there's an /etc/default/docker, where you can set the DOCKER_OPTS environment variable for the daemon, though.
docker  ubuntu  debian  centos  configfile  configuration  reference 
january 2019 by kme
Best way to move docker directory · Issue #3127 · moby/moby |
Good evening, I'm looking for the best way to move docker directory (default /var/lib/docker) to another directory. (Technically other disk partition) I'm using devicemapper, and I think a lot of things are mounted, so it's not as easy a...
docker  configfile  centos  ubuntu  migration  reference 
january 2019 by kme
ubuntu - Using dnsmasq with NetworkManager - Super User |
This didn't fix anything for me, but did --that is, set DOCKER_OPTS in /etc/default/docker to the corporate DNS servers, instead of the defaults which are, like, Google's DNS servers or something. Then 'sudo systemctl restart docker'.
If this is right I think that, as you say, the only solution to the problem is to disable the NM-drive dnsmasq by commenting out the line
<code class="language-bash">

in the file /etc/NetworkManager/NetworkManager.conf and install the "standard" dnsmasq and then configure it via its standard /etc/dnsmasq.conf configuration file.
dns  docker  dnsmasq  networking  ubuntu  annoyance 
january 2019 by kme
How to Get Code into a Docker Container |
<code class="language-bash">
docker run -d -P --name <name of your container> -v /path/to/local/directory:/path/to/container/directory <image name> ...
docker  devops  sharedvolume  reference 
december 2018 by kme
16.04 - /usr/sbin/fanctl: No such file or directory in /etc/network/if-up.d/ubuntu-fan" - Ask Ubuntu |
Not sure if this fixed anything (or broke Docker), but at least `ifup` works now without bombing with error code 127.
I had this happen after I installed and later removed Docker. The Docker daemon depends on FAN so it gets installed, but if you don't purge it upon removal the startup script in /etc/network/if-up.d/ sticks around. Remove it with apt remove --purge ubuntu-fan.
docker  networking  ubuntu  elementary  errormessage  maybesolution 
december 2018 by kme
Some docker examples |
<code class="language-bash">docker commit --message="Snapshot of my container" my_container my_container_snapshot:yymmdd</code>
docker  container  sysadmin  webdevel  solution 
october 2018 by kme
Cannot download Docker images behind a proxy - Stack Overflow
As mentioned in one of the other posts, the 'export' is required in /etc/sysconfig/docker.

On centos the configuration file for docker is at:


Adding below line helped me to get docker daemon working behind proxy server:

centos  centos6  docker  sysadmin  solution 
may 2017 by kme
Tips & Tricks with Alpine + Docker
Install a specific version of a package that it's not on the default repo

This is the way I like most because keeps things clean is it truth that I normally have to do this for just one package it I had more that one package I'll do it in a different way.

apk add 'postgresql>9.5' --update-cache --repository \

Notice: With more than one I problably define a repository like echo "@edge" >> /etc/apk/repositories and use it like apk add "postgresql@edge>9.4"
docker  container  alpine  tipsandtricks  solution 
april 2017 by kme
Docker lost CMD information after export and import · Issue #8334 · docker/docker
So, moral of the story is don't use 'docker save' and then expect 'docker import' to work; 'load' is the inverse of 'save.

docker save and docker load will preserve image metadata (CMD, ENTRYPOINT, etc) and all layers.

docker export and docker import don't preserve metadata. This is by design and it's not being changed.

docker import will be extended with a --change option to allow CMD, ENTRYPOINT, ENV and many other options to be set. Please take a look at #7239 for the plan concerning this, especially #7239 (comment)

Squashing layers will also be implemented, so that will be another way to address the problem of flattening images while keeping metadata.

This issue is invalid. I'll close it now.</blockquote
docker  configfile  solution 
march 2017 by kme
Docker save and import does not work - General Discussions - Docker Forums
Use 'load' for a Docker image that was 'save'd (even though you get no warning that all the layers and metadata are being dumped when you 'import' a 'save'd image anyway).
docker  errormessage  solution 
march 2017 by kme
docker export and load problems · Issue #10429 · docker/docker
I think while load failed but import works fine with exported tar ball. So for some reason the doco is not clear on that point - if you export a CT to a tar ball you need to use import rather than load. if you save an image to a tar ball then use load to restore.

So it might not be a bug at all
docker  maybesolution  errormessage 
march 2017 by kme
« earlier      
per page:    204080120160

Copy this bookmark:

to read