There is a newer way of using the command, as it is also the case in a few other docker commands.
Even though both the command can be used to remove a docker image, the command using docker image rm is the most recent way of using it.
There is a newer way of using the command, as it is also the case in a few other docker commands.
Even though both the command can be used to remove a docker image, the command using docker image rm is the most recent way of using it.
Trying to start the docker service after some upgrades fails with the following message:
Failed to start docker.service: Unit is masked.
It turns out that after upgrading or more specifically removing and then upgrading the docker installation in ubuntu (in this particular case in raspberry 4 with Ubuntu 20.04 installed), results in this error.
A search brings up the following:
https://forums.docker.com/t/failed-to-start-docker-service-unit-is-masked/67413
and from that the following bug post:
https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1844894
So the solution is to run the following to be able to start the docker service (described in the first link above):
sudo systemctl unmask docker sudo systemctl start docker
You would like to test worldPing (https://worldping.raintank.io/worldping/) in your local environment for evaluation purposes.
$ docker exec -it grafana /bin/bash bash-5.0$ grafana-cli plugins install raintank-worldping-app
bash-5.0$ exit $ docker stop grafana $ docker start grafana
You wold like to know the IP Address of your host from inside a running docker container.
Run the following inside the container:
route | awk '/^default/ { print $2 }'
Problem
You are trying to use docker-compose to get some services up with docker but you see an error like the following:
Cannot create container for service xxx: invalid mode: /path/to/volume/
Solution
This is more than likely caused by a typo in your yml file, so go back and check carefully for any typos and correct them.
Problem
Using docker-compose up (or build), displays the following error message (even though the same command used to work previously):
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
Solution
This is quite possible caused by permissions issue, as one of the folders files that docker is trying to use is owned by a different user/group from the one trying to use the docker-compose commands. Try to find the file/folder with the different permissions and change it to your user name and group, or use change the files by using something like:
chown -R me:me .
Problem
You are trying to run the ps command in a docker container (ie ps ax), but you get:
bash: ps: command not found
Solutionapt install procps
Taken from the answer here
Problem
You would like to know the IP Address of a running Docker container.
Solution
Use the following to find out the IP Address by replacing the container_name with the actual container name:
docker inspect -f '{{ .NetworkSettings.IPAddress }}' container_name
Problem
You are trying to set up http endpoint monitoring with prometheus and blackbox_exporter by specifying something like the following:
... job_name: 'blackbox' metrics_path: /probe params: module: [http_2xx] static_configs: - targets: - 'localhost:8080' relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 127.0.0.1:9115 ...
but you are getting the error (in prometheus targets) that connection was refused.
Solution
First specify the ip protocol as ip4 if you are not using ip6 like:
modules: http_2xx: prober: http timeout: 5s http: preferred_ip_protocol: "ip4" valid_status_codes: [200] method: GET
And then make sure that you use the container IP address in the replacement field if you have started blackbox_exporter as a docker container (tip taken from here), which you can find by looking for the container IP address (docker inspect blackbox_exporter | grep IPAddress).
So your prometheus configuration should look like the following (different replacement IP):
job_name: 'blackbox' metrics_path: /probe params: module: [http_2xx] static_configs: - targets: - 'localhost:8080' relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 172.17.0.3:9115
Problem
You have used ‘Bring your own node’ to use a server with one account, but you want to change the account and move the node to the new one.
Solution
Use your old account to terminate the node or login to the server and use the following to stop the running dockercloud-agent:
sudo service dockercloud-agent stop
Go to the Docker Cloud web ui interface, and use the 'Bring your own node'. Copy the token that appears after the sudo -H sh -s on the popup window.
On the server update the token with the one from the new account that you just copied, by running the following:
sudo dockercloud-agent set Token=xxxxx_new_token_xxxx
And now restart the dockercloud-agent on the server:
sudo dockercloud-agent restart
You should now be able to see 'Node xxxx detected' on the Docker Cloud web ui after a couple of minutes.