Running a simple docker test.
docker run --rm -v c:/Users:/data alpine ls -al /data
Results in the following output.
total 4
drwxr-xr-x 2 root root 40 Oct 19 09:02 .
drwxr-xr-x 1 root root 4096 Oct 19 09:05 ..
the directory is empty, in windows it contains the user(s).
edit
Further to this, looking at the docker log file, I see this:
[11:11:02.873][SambaShare ][Info ] Creating share "C:\" as "C" with Full Control to "QXV0615"
[11:11:02.957][Cmd ][Info ] C was shared successfully.
[11:11:03.005][Cmd ][Info ] Share name C
[11:11:03.005][Cmd ][Info ] Path C:\
[11:11:03.005][Cmd ][Info ] Remark
[11:11:03.005][Cmd ][Info ] Maximum users No limit
[11:11:03.005][Cmd ][Info ] Users
[11:11:03.005][Cmd ][Info ] Caching Caching disabled
[11:11:03.006][Cmd ][Info ] Permission W9\QXV0615, FULL
[11:11:03.006][Cmd ][Info ] The command completed successfully.
[11:11:03.009][SambaShare ][Info ] "C" is shared
[11:11:03.011][SambaShare ][Error ] Unable to validate cred: Invalid username or password
[11:11:03.011][SambaShare ][Info ] Removing share C
[11:11:03.053][NamedPipeClient][Info ] Received response for Mount
seems there is a samba credentials issue? How do I fix the credentials?
VPN ISSUE
The problem occurs when my CISCO VPN is connected.
Volumes will not work when the VPN is connected. I have tried the suggestions here, but no dice!
https://github.com/boot2docker/boot2docker/issues/628
https://github.com/docker/for-win/issues/360
Related
I am trying to give a container access to a USB device on the host. The device appears to exist but docker seems unable to access it when creating the container.
Any thoughts on how to proceed?
The device appears to exist:
$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Jun 21 20:47 /dev/ttyUSB0
It's a Sonoff zigbee dongle:
$ ls -l /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 Jun 21 20:47 usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_1ec67e3b0b86ec11b4cd631719c2d21c-if00-port0 -> ../../ttyUSB0
But when I try to pass it to a container (simple example here), I get an error:
$ docker run --device /dev/ttyUSB0 alpine
docker: Error response from daemon: error gathering device information while adding custom device "/dev/ttyUSB0": no such file or directory.
I've installed latest version which is Version: 2.1.0.4 (39773) as of today.
When I am switching to Windows Containers by clicking on right click menu of the docker status icon, I get following error after a while. I do have Hypder-V enabled on my machine.
Wondering if anyone experiencing this issue and what can the resolution be.
Attaching the log of docker for this
[14:45:57.808][VpnKit ][Info ] vpnkit.exe: 2 upstream DNS servers are configured
[14:45:57.808][VpnKit ][Info ] vpnkit.exe: New Gateway forward configuration: [{"protocol":"udp","external_port":53,"internal_ip":"127.0.0.1","internal_port":51700},{"protocol":"tcp","external_port":53,"internal_ip":"127.0.0.1","internal_port":58896}]
[14:45:57.808][VpnKit ][Info ] vpnkit.exe: Updating transparent HTTP redirection: {
[14:45:57.808][VpnKit ][Info ] "exclude": "",
[14:45:57.808][VpnKit ][Info ] "transparent_http_ports": [
[14:45:57.808][VpnKit ][Info ] 80
[14:45:57.808][VpnKit ][Info ] ],
[14:45:57.808][VpnKit ][Info ] "transparent_https_ports": [
[14:45:57.919][APIRequestLogger ][Info ] [467d6772-0076-4586-88cf-8fba2bdeb19b] GET http://unix/versions
[14:45:57.920][APIRequestLogger ][Info ] [467d6772-0076-4586-88cf-8fba2bdeb19b] GET http://unix/versions -> 200 OK took 0ms
[14:45:57.808][VpnKit ][Info ] 443
[14:45:57.808][VpnKit ][Info ] ]
[14:45:57.808][VpnKit ][Info ] }
[14:45:57.808][VpnKit ][Info ] vpnkit.exe: C:\Windows\System32\drivers\etc\hosts file has bindings for host.docker.internal gateway.docker.internal host.docker.internal gateway.docker.internal host.docker.internal gateway.docker.internal host.docker.internal gateway.docker.internal kubernetes.docker.internal
[14:45:57.909][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="🀠socket server listening : \\\\.\\pipe\\dockerGuiToDriver"
[14:45:57.924][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="docker proxy: ready"
[14:45:57.928][ApiProxy ][Error ] time="2019-11-15T14:45:57+11:00" msg="Unable to forward a named-pipe to the lifecycle-server: /forwards/expose/pipe returned unexpected status: 500"
[14:45:57.928][ApiProxy ][Error ] time="2019-11-15T14:45:57+11:00" msg="Unable to forward a named-pipe to the Linux docker engine: /forwards/expose/pipe returned unexpected status: 500"
[14:45:57.928][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" level=info msg=waitForDockerUp
[14:45:57.928][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="🀠socket server starting : \\\\.\\pipe\\dockerGuiToDriver"
[14:45:57.928][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="Static DNS lookup table: map[docker-desktop.:19.16.65.3 docker-for-desktop.:19.16.65.3 docker.for.win.gateway.internal.:19.16.65.1 docker.for.win.host.internal.:19.16.65.2 docker.for.win.http.internal.:19.16.65.1 docker.for.win.localhost.:19.16.65.2 gateway.docker.internal.:19.16.65.1 host.docker.internal.:19.16.65.2 kubernetes.docker.internal.:19.16.65.3 vm.docker.internal.:19.16.65.3]"
[14:45:57.929][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="proxy >> HEAD /_ping\n"
[14:45:57.929][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="Writing C:\\Users\\AppData\\Roaming\\Docker\\gateway_forwards.json"
[14:45:57.931][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="proxy << HEAD /_ping (2.0048ms)\n"
[14:45:57.949][NamedPipeClient ][Info ] Received response for engine/start
[14:45:57.932][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="proxy >> GET /v1.40/info\n"
[14:45:57.932][GoBackendProcess ][Info ] error CloseWrite to: The pipe is being closed.
[14:45:57.939][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="proxy >> GET /v1.40/containers/json\n"
[14:45:57.941][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="proxy << GET /v1.40/containers/json (2.0037ms)\n"
[14:45:57.942][GoBackendProcess ][Info ] error CloseWrite to: The pipe is being closed.
[14:45:57.945][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="proxy << GET /v1.40/info (13.0036ms)\n"
[14:45:57.946][GoBackendProcess ][Info ] error CloseWrite to: The pipe is being closed.
[14:45:57.946][ApiProxy ][Info ] time="2019-11-15T14:45:57+11:00" msg="Docker is responding"
[14:45:57.949][DockerDaemonChecker][Info ] Docker daemon is running
[14:45:57.949][NamedPipeServer ][Info ] engine/start done in 00:00:00.3189743.
[14:45:58.141][ApiProxy ][Info ] time="2019-11-15T14:45:58+11:00" msg="proxy >> HEAD /_ping\n"
[14:45:58.143][ApiProxy ][Info ] time="2019-11-15T14:45:58+11:00" msg="proxy << HEAD /_ping (2.0074ms)\n"
[14:45:58.144][GoBackendProcess ][Info ] error CloseWrite to: The pipe is being closed.
[14:45:58.177][ApiProxy ][Info ] time="2019-11-15T14:45:58+11:00" msg="proxy >> GET /v1.40/info\n"
[14:45:58.189][ApiProxy ][Info ] time="2019-11-15T14:45:58+11:00" msg="proxy << GET /v1.40/info (11.9924ms)\n"
[14:45:58.190][GoBackendProcess ][Info ] error CloseWrite to: The pipe is being closed.
[14:45:58.755][ApiProxy ][Info ] time="2019-11-15T14:45:58+11:00" msg="proxy >> HEAD /_ping\n"
[14:45:58.758][ApiProxy ][Info ] time="2019-11-15T14:45:58+11:00" msg="proxy << HEAD /_ping (3.0077ms)\n"
[14:45:58.759][GoBackendProcess ][Info ] error CloseWrite to: The pipe is being closed.
[14:45:58.783][ApiProxy ][Info ] time="2019-11-15T14:45:58+11:00" msg="proxy >> GET /v1.40/version\n"
[14:45:58.797][ApiProxy ][Info ] time="2019-11-15T14:45:58+11:00" msg="proxy << GET /v1.40/version (14.0121ms)\n"
[14:45:58.798][GoBackendProcess ][Info ] error CloseWrite to: The pipe is being closed.
[14:45:58.808][Notifications ][Info ] Docker Desktop is running
[14:45:58.813][Notifications ][Error ] Time out has expired and the operation has not been completed.
[14:45:58.828][NamedPipeClient ][Info ] Sending app/version()...
[14:45:58.829][NamedPipeClient ][Info ] Received response for app/version
[14:45:58.829][NamedPipeClient ][Info ] Sending diagnostics/gather()...
[14:45:58.829][NamedPipeServer ][Info ] app/version()
[14:45:58.829][NamedPipeServer ][Info ] app/version done in 00:00:00.
[14:45:58.830][NamedPipeServer ][Info ] diagnostics/gather()
[14:46:02.797][VpnKit ][Info ] vpnkit.exe: Gateway forwards file C:\Users\AppData\Roaming\Docker\gateway_forwards.json has changed
[14:46:02.797][VpnKit ][Info ] vpnkit.exe: Reading gateway forwards file from C:\Users\ppData\Roaming\Docker\gateway_forwards.json
[14:46:02.799][VpnKit ][Info ] vpnkit.exe: New Gateway forward configuration: [{"protocol":"udp","external_port":53,"internal_ip":"127.0.0.1","internal_port":54694},{"protocol":"tcp","external_port":53,"internal_ip":"127.0.0.1","internal_port":59304}]
[14:46:13.196][CrashReport ][Info ] Diagnostics cancelled by user
[14:46:13.197][NamedPipeClient ][Info ] Sending app/version()...
[14:46:13.198][NamedPipeClient ][Info ] Received response for app/version
[14:46:13.198][NamedPipeClient ][Info ] Sending diagnostics/stop-gather()...
[14:46:13.199][NamedPipeClient ][Info ] Received response for diagnostics/stop-gather
[14:46:13.197][NamedPipeServer ][Info ] app/version()
[14:46:13.201][NamedPipeClient ][Error ] Unable to send diagnostics/gather: Object reference not set to an instance of an object.
[14:46:13.202][CrashReport ][Warning] Unable to gather diagnostics in Windows Service : (Object reference not set to an instance of an object.)
[14:46:13.198][NamedPipeServer ][Info ] app/version done in 00:00:00.0009991.
[14:46:13.204][CrashReport ][Warning] Starting to gather diagnostics as User : 'C:\Program Files\Docker\Docker\Resources\com.docker.diagnose.exe' gather.
[14:46:13.198][NamedPipeServer ][Info ] diagnostics/stop-gather()
[14:46:13.199][NamedPipeServer ][Info ] diagnostics/stop-gather done in 00:00:00.0010009.
[14:46:13.200][NamedPipeServer ][Error ] Unable to execute diagnostics/gather: Object reference not set to an instance of an object. at Docker.Backend.BackendService.GatherDiagnostics()
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)
In Docker Client - Settings - Make sure below highlighted check box is on. "Expose daemon on ...." . I was facing exact same error and tried multiple other solution but this was the main trick.
I have created a docker image for deployment of microservice.
I am right now testing ti by trying to deploy on my local machine.
The docker container ogt created successfully and I am getting started application
o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-10-25 12:41:53.867 INFO [] 1 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed
2019-10-25 12:41:53.901 INFO [] 1 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s)
2019-10-25 12:41:53.949 INFO [] 1 --- [ main] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references
2019-10-25 12:41:54.230 INFO [] 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
But when I try to hit any rest service like so localhost:8080/myApi/test
It gives me error
localhost refused to connect.
Search Google for localhost 8080 payment
ERR_CONNECTION_REFUSED
What could possibly be going wrong ?
Checking list of running images docker ps gives me an entry with empty port details .Could this be the reason ?
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2feab85c47db test_3 "java -Dserver.port=…" 18 minutes ago Up 18 minutes wizardly_leavitt
To access services inside containers you need to forward host ports to container ports.
It can be done with -p HOST_PORT:CONTAINER_PORT parameter in the command line.
docker run -it -p 8080:8080 test_3
REF: https://docs.docker.com/config/containers/container-networking/
I ve a container running a java process and writing the java logs in a specific volume declared inside the container within Dockerfile :
Dockerfile:
FROM myRegistry/jdk:1.8.181
VOLUME /opt/logs
ENTRYPOINT ["java",","/opt/application/myapp.jar", "--spring.profiles.active=server"]
As you can see i'm declaring this volume /opt/logs inside the container .
(inside my java app , that folder is userd by logback to write errors )
But when running the container , it fails after seconds saying that there is no access to this folder "permission denied" :
Caused by: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/opt/logs/myapp.log,true) call failed. java.io.FileNotFoundException: /opt/logs/myapp.log (Permission denied)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:153)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:56)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:46)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:106)
at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:266)
... 18 more
I ve succeded to access the container before it's getting down to see the permissions :
[myuser#8d39ada92190 opt]$ ll
total 49100
-rwxrwxrwx. 1 myuser mygroup 50273298 Sep 19 15:57 myapp.jar
drwxr-xr-x 2 65534 65534 4096 Oct 1 13:52 logs
I noticed that the "logs" folder is not st with the normal user and group (myuser / mygroup) but with other strange ones 65534
Any ideas ??
I'm setting a docker to run a application on my custom board,i have made a custom build environment to run docker on my board,and it was successfull.But when i execute docker ps command it shows error
ERROR:Error response from daemon: 404 page not found.
ERROR Message
docker ps
Error response from daemon: 404 page not found
root#salvator-x:~# [ 143.758164] audit_printk_skb: 6 callbacks suppressed
[ 143.763172] audit: type=1325 audit(1553864701.319:13): table=nat family=2 entries=8
[ 143.770891] audit: type=1300 audit(1553864701.319:13): arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=0 a2=40 a3=3d8e0a90 items=0 ppid=3345 pid=3374 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-multi" key=(null)
[ 143.798210] audit: type=1327 audit(1553864701.319:13): proctitle=2F7573722F7362696E2F69707461626C6573002D2D77616974002D74006E6174002D4600444F434B4552
[ 143.815500] audit: type=1325 audit(1553864701.375:14): table=nat family=2 entries=8
at first, check if you have any proxy in your envirement with this command:
env | grep -i proxy
now remove content of this below path:
/var/lib/docker/network/
if it's still not working, reinstall docker.