-
Notifications
You must be signed in to change notification settings - Fork 4
Q&A
rm -rf ~/Library/Containers/com.docker.*
vi ~/Library/Group\ Containers/group.com.docker/settings.json
you just find "filesharingDirectories"
and replace it "filesharingDirectories": []
.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing, as follows.
Problem : docker: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:8000 -> 0.0.0.0:0: listen tcp 0.0.0.0:8000: bind: address already in use.
Firstly, you should check the port with lsof -i:port
command, and use command kill -9(Note: must add -9 option)
kill this process.
If no service using the target port on your machine, you can try to restart docker or system.
docker exec -it ngxwayContainer bsah
If you can't mapping port successfully, it may be caused by the incorrect order of the port mapping.
# correct
docker run --name testContainer -p outsidePort:insidePort -d testImage
# wrong
docker run --name testContainer -p insidePort:outsidePort-d testImage
# example
docker run --name nginxContainer -p 8010:80 -d nginx
Problem :docker: Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU CFS scheduler or the cgroup is not mounted
You can remove --cpus=$maxNCPU
option in the ngxway
file. More detail
If you couldn't stop the docker desktop by operating in UI, please try to use kill -9
command or restart your mac.
What is ab ? It's be used for benchmarking server or something.
- For Mac
brew install httpd
- For CentOS
yum install -y httpd-tools
- For Ubuntu/Debian
sudo apt-get update
sudo apt-get install apache2-utils
If you encounter this error, please have a try docker: Error response from daemon: Mounts denied, if it not work, you can change file sharing
as follows.
If you still have problems, it may be due to permission error, try changing to the correct permission group or using another directory.
You just run rm ~/.docker/config.json
and try again.
If you encounter this error, you can try to disable the proxy you are using.
If you still have problems, you can try it : https://access.redhat.com/solutions/200153
Problem : docker: Error response from daemon: pull access denied for openresty, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
You shouldn't use command docker run ... -d openresty
, you should use complete openresty/openresty
# correct
docker run --name openrestyContainer -p 8011:80 -d openresty/openresty
# wrong
docker run --name openrestyContainer -p 8011:80 -d openresty