Hi There,
I’m trying to hit my node app from the localhost. I’ve set the webpack server to listen on 0.0.0.0 but when I try to hit the URL I get nothing, curl does not work either. What else do I need to configure?
Expected behavior
Able to browse node app running on port 8082 from the browser using the ip of the container
Actual behavior
not found error when accessing from browser
Information
OS: 10.10.5 Yosmite, 10.10.5 | Docker: Version 1.12.0-beta21 (build: 11019)
[
{
“Id”: “ec5a86a805277352244e63c2f4f0a44b23ca7e904fab0626b35782002daad50a”,
“Created”: “2016-08-04T12:02:17.251458893Z”,
“Path”: “bash”,
“Args”: ,
“State”: {
“Status”: “exited”,
“Running”: true,
“Paused”: false,
“Restarting”: false,
“OOMKilled”: false,
“Dead”: false,
“Pid”: 0,
“ExitCode”: 0,
“Error”: “”,
“StartedAt”: “2016-08-04T12:02:17.450240084Z”,
“FinishedAt”: “2016-08-04T12:19:49.959934855Z”
},
“Image”: “sha256:0d90898532210246893d448740ee6ad83ad351f71dc188d4a5705d193cb3a580”,
“ResolvConfPath”: “/var/lib/docker/containers/ec5a86a805277352244e63c2f4f0a44b23ca7e904fab0626b35782002daad50a/resolv.conf”,
“HostnamePath”: “/var/lib/docker/containers/ec5a86a805277352244e63c2f4f0a44b23ca7e904fab0626b35782002daad50a/hostname”,
“HostsPath”: “/var/lib/docker/containers/ec5a86a805277352244e63c2f4f0a44b23ca7e904fab0626b35782002daad50a/hosts”,
“LogPath”: “/var/lib/docker/containers/ec5a86a805277352244e63c2f4f0a44b23ca7e904fab0626b35782002daad50a/ec5a86a805277352244e63c2f4f0a44b23ca7e904fab0626b35782002daad50a-json.log”,
“Name”: “/test”,
“RestartCount”: 0,
“Driver”: “aufs”,
“MountLabel”: “”,
“ProcessLabel”: “”,
“AppArmorProfile”: “”,
“ExecIDs”: null,
“HostConfig”: {
“Binds”: [
“/Users/xx/.ssh:/root/.ssh”,
“/Users/xxx/projects/”
],
“ContainerIDFile”: “”,
“LogConfig”: {
“Type”: “json-file”,
“Config”: {}
},
“NetworkMode”: “default”,
“PortBindings”: {
“8082/tcp”: [
{
“HostIp”: “”,
“HostPort”: “8080”
}
]
},
“RestartPolicy”: {
“Name”: “no”,
“MaximumRetryCount”: 0
},
“AutoRemove”: false,
“VolumeDriver”: “”,
“VolumesFrom”: null,
“CapAdd”: null,
“CapDrop”: null,
“Dns”: ,
“DnsOptions”: ,
“DnsSearch”: ,
“ExtraHosts”: null,
“GroupAdd”: null,
“IpcMode”: “”,
“Cgroup”: “”,
“Links”: null,
“OomScoreAdj”: 0,
“PidMode”: “”,
“Privileged”: false,
“PublishAllPorts”: false,
“ReadonlyRootfs”: false,
“SecurityOpt”: null,
“UTSMode”: “”,
“UsernsMode”: “”,
“ShmSize”: 67108864,
“Runtime”: “runc”,
“ConsoleSize”: [
0,
0
],
“Isolation”: “”,
“CpuShares”: 0,
“Memory”: 0,
“CgroupParent”: “”,
“BlkioWeight”: 0,
“BlkioWeightDevice”: null,
“BlkioDeviceReadBps”: null,
“BlkioDeviceWriteBps”: null,
“BlkioDeviceReadIOps”: null,
“BlkioDeviceWriteIOps”: null,
“CpuPeriod”: 0,
“CpuQuota”: 0,
“CpusetCpus”: “”,
“CpusetMems”: “”,
“Devices”: ,
“DiskQuota”: 0,
“KernelMemory”: 0,
“MemoryReservation”: 0,
“MemorySwap”: 0,
“MemorySwappiness”: -1,
“OomKillDisable”: false,
“PidsLimit”: 0,
“Ulimits”: null,
“CpuCount”: 0,
“CpuPercent”: 0,
“IOMaximumIOps”: 0,
“IOMaximumBandwidth”: 0
},
“GraphDriver”: {
“Name”: “aufs”,
“Data”: null
},
“Mounts”: [
{
“Source”: “/Users/xxx/projects/”,
“Destination”: “/code”,
“Mode”: “”,
“RW”: true,
“Propagation”: “rprivate”
},
{
“Source”: “/Users/xxx/.ssh”,
“Destination”: “/root/.ssh”,
“Mode”: “”,
“RW”: true,
“Propagation”: “rprivate”
}
],
“Config”: {
“Hostname”: “ec5a86a8052”,
“Domainname”: “”,
“User”: “”,
“AttachStdin”: true,
“AttachStdout”: true,
“AttachStderr”: true,
“ExposedPorts”: {
“8082/tcp”: {}
},
“Tty”: true,
“OpenStdin”: true,
“StdinOnce”: true,
“Env”: [
“no_proxy=*.local, 169.254/16”,
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”,
“NPM_CONFIG_LOGLEVEL=info”,
“NODE_VERSION=6.3.1”
],
“Cmd”: [
“bash”
],
“Image”: “node:6”,
“Volumes”: null,
“WorkingDir”: “”,
“Entrypoint”: null,
“OnBuild”: null,
“Labels”: {}
},
“NetworkSettings”: {
“Bridge”: “”,
“SandboxID”: “335eda2be2e1b7bf3f044aa703f0bb7634528ff7e33fc8efc6e0b1a09568123e”,
“HairpinMode”: false,
“LinkLocalIPv6Address”: “”,
“LinkLocalIPv6PrefixLen”: 0,
“Ports”: null,
“SandboxKey”: “/var/run/docker/netns/335eda2be2e1”,
“SecondaryIPAddresses”: null,
“SecondaryIPv6Addresses”: null,
“EndpointID”: “”,
“Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“MacAddress”: “”,
“Networks”: {
“bridge”: {
“IPAMConfig”: null,
“Links”: null,
“Aliases”: null,
“NetworkID”: “db93a5c17dfacc773902b4e8bd41b3e25939a00697cdc1c3ad7bb6a9b0addff4”,
“EndpointID”: “”,
“Gateway”: “”,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“MacAddress”: “”
}
}
}
}
Steps to reproduce the behavior
docker run -ti -v ~/.ssh:/root/.ssh -v $(pwd):/code -p 8080:8082 --name test node:6 bash