-
Notifications
You must be signed in to change notification settings - Fork 4
Q&A
![image](https://user-images.githubusercontent.com/35942268/224470338-2270d682-d93d-4b43-9f04-17c5e4054b78.png)
rm -rf ~/Library/Containers/com.docker.*
vi ~/Library/Group\ Containers/group.com.docker/settings.json
you just find "filesharingDirectories"
and replace it "filesharingDirectories": []
.
![image](https://user-images.githubusercontent.com/35942268/224471074-1ef11c14-1313-4501-987d-873260e673c8.png)
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing, as follows.
![image](https://user-images.githubusercontent.com/35942268/224471109-6e73462a-957e-4b9d-a934-76b6a3c5538d.png)
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.
![image](https://user-images.githubusercontent.com/35942268/224477706-278faf9c-7e06-4c99-b623-506c698d5d46.png)
If you still have problems, it may be due to permission error, try changing to the correct permission group or using another directory.
![image](https://user-images.githubusercontent.com/35942268/224477470-93214d61-3c33-432b-a7d0-a7f166eace40.png)
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.
![image](https://user-images.githubusercontent.com/35942268/224481389-798045a7-58f6-4392-821a-1e44c4d81ae5.png)
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