Docker Community Forums

Share and learn in the Docker community.

Cant access webserver inside container


(Ftlandrew) #1

Hi,

Firstly let m esay im new to docker as of 20 minutes ago…

However i am wanting to test a demo of something:
https://hub.docker.com/r/opinkerfi/adagios-rpm/

So i run the command n powershell:
docker create --name=my-adagios -p 8080:80 opinkerfi/adagios-rpm

It shpuld have a web interface that i can then log into but everything says page cannot be displayed.

I am running Win 10 Enterprise and have Docker for Windows installed

If i run an ipconfig i have 3 addresses:
192.168.1.77 - which is my local LAN ip
172.30.180.17 - which is the local hyperV virtual switch address
10.0.75.1 - which in the docker virtual ip

if i go to any of these on port 8080 all i get is page cannot be displayed

If i run docker inspect my-adagios this is the output (no ipv4 address that i can see)

[
{
“Id”: “014fa8dfe046b42c53e28e7b93137827ec5097388c87950febbb77781196a66e”,
“Created”: “2018-06-18T15:09:00.6712Z”,
“Path”: “/bin/bash”,
“Args”: [
“/usr/bin/run.sh”,
“/usr/sbin/init”
],
“State”: {
“Status”: “created”,
“Running”: false,
“Paused”: false,
“Restarting”: false,
“OOMKilled”: false,
“Dead”: false,
“Pid”: 0,
“ExitCode”: 0,
“Error”: “”,
“StartedAt”: “0001-01-01T00:00:00Z”,
“FinishedAt”: “0001-01-01T00:00:00Z”
},
“Image”: “sha256:eb839ed9327dab3aeccae2f3671f7e2b339cd07b048a9f51cae710ac157691e3”,
“ResolvConfPath”: “”,
“HostnamePath”: “”,
“HostsPath”: “”,
“LogPath”: “”,
“Name”: “/my-adagios”,
“RestartCount”: 0,
“Driver”: “overlay2”,
“Platform”: “linux”,
“MountLabel”: “”,
“ProcessLabel”: “”,
“AppArmorProfile”: “”,
“ExecIDs”: null,
“HostConfig”: {
“Binds”: null,
“ContainerIDFile”: “”,
“LogConfig”: {
“Type”: “json-file”,
“Config”: {}
},
“NetworkMode”: “default”,
“PortBindings”: {
“80/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”: “shareable”,
“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,
“NanoCpus”: 0,
“CgroupParent”: “”,
“BlkioWeight”: 0,
“BlkioWeightDevice”: [],
“BlkioDeviceReadBps”: null,
“BlkioDeviceWriteBps”: null,
“BlkioDeviceReadIOps”: null,
“BlkioDeviceWriteIOps”: null,
“CpuPeriod”: 0,
“CpuQuota”: 0,
“CpuRealtimePeriod”: 0,
“CpuRealtimeRuntime”: 0,
“CpusetCpus”: “”,
“CpusetMems”: “”,
“Devices”: [],
“DeviceCgroupRules”: null,
“DiskQuota”: 0,
“KernelMemory”: 0,
“MemoryReservation”: 0,
“MemorySwap”: 0,
“MemorySwappiness”: null,
“OomKillDisable”: false,
“PidsLimit”: 0,
“Ulimits”: null,
“CpuCount”: 0,
“CpuPercent”: 0,
“IOMaximumIOps”: 0,
“IOMaximumBandwidth”: 0
},
“GraphDriver”: {
“Data”: {
“LowerDir”: “/var/lib/docker/overlay2/e3493859aede2447879b28940dd9bf83b2946f81bdaaf654978fb9856bc85f20-init/diff:/var/lib/docker/overlay2/1f5d6a219005e2e4507a46b6270cc74f0935dd5261401956baa5ca6a9edf6fea/diff:/var/lib/docker/overlay2/fbfb12c3dd49f8059fcfea5d1b17f63d6cd7f9ec1dda6f2227d8157ecb65b6fb/diff:/var/lib/docker/overlay2/e48ef4e4644b948c396fd779df8528de824e76c31b059effd60a42071252d773/diff:/var/lib/docker/overlay2/56438eca04a2a483c76f56b7031ac802eb04749de75aa51959c433629b13f483/diff:/var/lib/docker/overlay2/22fde9ff1fd1d93dd7f241904aa9b1606c5b7243aebda7ff9d5e54bfbf1b5ed7/diff:/var/lib/docker/overlay2/1e9a255bbdef3a01a7b5660c58458c8cdf565d5e94955d3b6b3ce2e3fb36c536/diff:/var/lib/docker/overlay2/c9d1b80b81db228062042a872fded3e0b5e7a9b084bcf55653a8794d656a49e3/diff:/var/lib/docker/overlay2/6e654a8b8ebec38aed6147cd76d93caa50f88d2064db558b42109ba7de2ba8ee/diff:/var/lib/docker/overlay2/cd72478e25b04dea41f66a535a6c9dbf7f20d5ac55bc7cb10bf2cdff5307600f/diff:/var/lib/docker/overlay2/7fdc98ca02f202c0796b6f81c873ca6b1f18dd7aae8199088cc57bb77161e04d/diff:/var/lib/docker/overlay2/81da5a41849783070737715f2ee64b46e7a4ba9baa7ec1fe98f7d02f65768ac4/diff:/var/lib/docker/overlay2/da12187ef5283e4d1c328a769ff50197d1ca65ac99c8c4416a57834e90676b00/diff:/var/lib/docker/overlay2/fc49940a1ee7a32ad7b4645494c659192339366a5a8ca8957d935775733dc137/diff:/var/lib/docker/overlay2/16d78b4d5d3fde9e6268ebba90d72392fb06ec8887fcb502930a691c19c1ca2d/diff:/var/lib/docker/overlay2/505bc93162814e0c93bf35e1fc4591daefa93e3337c2bc95bea5f966136b4ede/diff:/var/lib/docker/overlay2/3a2086229d414ab09fa06d17f35fe8c39f63908b803b2cd50f502ed4209e6107/diff:/var/lib/docker/overlay2/a50de39703ecb21cd1a262d8f781995042ae21c747519b3ceb4ca065ba3068f7/diff:/var/lib/docker/overlay2/4493eac3342dcbfb6e8a527c195ece233a643fb57a7401d54c4ffb8bd5558d72/diff:/var/lib/docker/overlay2/cf099bc9134e5e8c5ece6bc6cb032c4c4bcecd341b3823f66669b8d9ac7a21d7/diff:/var/lib/docker/overlay2/cea378eab683f1ebc1a217aefabbd2719371d15a82d2a6906203b3c52aa68536/diff:/var/lib/docker/overlay2/9eeecd6160816232252b2f69cecf2d187bbdeaedd759c8470078ac4ab7f30216/diff:/var/lib/docker/overlay2/30a2a42d0b85147decb232940fda5a03ab5d9b0b5ae8f7dafedfb3041d83fbd2/diff:/var/lib/docker/overlay2/dc6b314d13557e66e0485a3a89b1afccf907ca28d88956671bc13f147df78630/diff:/var/lib/docker/overlay2/ed8436977f4a12e0dff32c1460971d9801c24771b1608d8532c52ffba44947ce/diff:/var/lib/docker/overlay2/2b145f67b6ba3efa392be6b773a89bbb7dac529fe04145a84a6acd6e2526d792/diff:/var/lib/docker/overlay2/55c771130d616bde5b096ad9f2fda5bc4e73f54af399f0963224c277eb55e941/diff:/var/lib/docker/overlay2/297c28d0f36fae11ce12c1e8de96b2c8ce5a69a6f0b2be291042dbe5b8d8b282/diff:/var/lib/docker/overlay2/7c58941d86b1a25ddab6f4e27837abdd4b7ea26f3b939d71448bd5f5fc8c2981/diff:/var/lib/docker/overlay2/4c7fa2f77f7859f8fc66bdd2d93bab6da4ad9ab0d54c772a85d98c4c83a7ef98/diff:/var/lib/docker/overlay2/6d654e6dfecc664d1c3dc87dfdbe793b6acefe39234462688c46c04944740eed/diff:/var/lib/docker/overlay2/d3590c85851fffcc4f5525edeb08ded2df4f06ee4a52146bffe8ada88d962505/diff:/var/lib/docker/overlay2/1eef36b484472729b46b37b8bb019bc636e30df85f354334b2a1a71d90712f46/diff:/var/lib/docker/overlay2/fb54c55bda7166e641c9bf32dca11cf873e582ce35c1340eddaa840fe978dba2/diff:/var/lib/docker/overlay2/064174017ed77811e567e1c3b8049e83a91adc4459bf67034b3aaab209f7a319/diff:/var/lib/docker/overlay2/547297614b050b051fb46f002cbe55941e903634830ea8ffcb488af8e598dca3/diff:/var/lib/docker/overlay2/33bb523caf73f9dbe508c4344f0f080bd5a40e74585095c3b8122fa6ee54e39e/diff:/var/lib/docker/overlay2/8392078774dae7dcf873d5725f932f6e4717dcbece01061e1767bcd415eacfe5/diff:/var/lib/docker/overlay2/b678867010a77d2b455c481ba172d2d30e70e56985612e537399dd2cc712a155/diff:/var/lib/docker/overlay2/ca60a63106ca7dcf732c0422ee65b2c0638f583d6fb0a2b11f891179dbc5d8cf/diff:/var/lib/docker/overlay2/4a195df32f6bc04075b282486ed24c35bc29be946f756789a7013b21ebeb087a/diff:/var/lib/docker/overlay2/b9dd30286f9a102035e0c77e48a2057905b8adbc06c5c1cebaec56efb13ccb23/diff:/var/lib/docker/overlay2/77a839501c223179f29a408bd29bac46448c2c7ecea7519c9faaaacce08fe67b/diff:/var/lib/docker/overlay2/c5316b3a35d23b4b022a207be090d662dfded810ff25a70771fe40fc63ce8102/diff:/var/lib/docker/overlay2/a62402ed4f40a98cb34a7a897f8427b21de2f67efbf64611b2b8aa393783a3c5/diff:/var/lib/docker/overlay2/a0217665f5bbf7e7797f33cd9071c72b3490c9f1910cc9430af2a4882935b9df/diff:/var/lib/docker/overlay2/da127daa2487b81e70bb7b5779cd14401e39e281d97cb255565cd39fcf4b69b4/diff:/var/lib/docker/overlay2/5ec9f5ff08138e83d68c7a3b5a18dab08db6721576ee91b5f508f0d57d39bff2/diff:/var/lib/docker/overlay2/1230eff899d59ffd55638981d660c4bf6c37c2188b9b72cd0169dd338f18c090/diff:/var/lib/docker/overlay2/9ea601fbbffebfc20b319a93dc8aebbaa8da2b5473c76688946f8b309a8055be/diff:/var/lib/docker/overlay2/fbb8f11bd8338e06b6ca214b7579e38e5cfe7f3c2a4312fec1a1b842652621f7/diff:/var/lib/docker/overlay2/6c68fc585283b0f4be0cf71be61e1a9ba3cf236ba40d5e6e0d7558ac174ed6f8/diff:/var/lib/docker/overlay2/86d0b1877a8f17389077d44557a2c707c23f2472ffcbe7add9218737257f43e3/diff:/var/lib/docker/overlay2/a55d564d793c49337d2094af5f9fefdf5a085553be3abf7e6b4fe4aca283f392/diff:/var/lib/docker/overlay2/abcc3debeefc4a97245de1f0c49510faa6b9bea230662a29527bd3532c6063ac/diff:/var/lib/docker/overlay2/eb5afe21c804a2311d354784fb4f2f42bb752f7fbd1e69e21e475d108c986c54/diff:/var/lib/docker/overlay2/3514937f6084d5e7ba09cb37b8afc34052c25992c5b090c704974700b2c4892a/diff:/var/lib/docker/overlay2/ed68d9a62e0a7ac7ea1f1d9d7247c494f3977230d39be41d145741aa63b3aed0/diff:/var/lib/docker/overlay2/c25bef42e5ce263f02ad1146a7afd3e7bcff521378403e747a0bcfe99e7d83fe/diff:/var/lib/docker/overlay2/eeb26e19129da49420c72bc1efcdb25de2e1141d85bdfe74328a3107d3b12307/diff:/var/lib/docker/overlay2/097c8a9725d5609ed37e4a1dc231532ea3b984bacda3811d2ba0f572a81f8781/diff”,
“MergedDir”: “/var/lib/docker/overlay2/e3493859aede2447879b28940dd9bf83b2946f81bdaaf654978fb9856bc85f20/merged”,
“UpperDir”: “/var/lib/docker/overlay2/e3493859aede2447879b28940dd9bf83b2946f81bdaaf654978fb9856bc85f20/diff”,
“WorkDir”: “/var/lib/docker/overlay2/e3493859aede2447879b28940dd9bf83b2946f81bdaaf654978fb9856bc85f20/work”
},
“Name”: “overlay2”
},
“Mounts”: [
{
“Type”: “volume”,
“Name”: “8d8547ce96c0840aec9ac071d00afa82bb8fcc91b2906b9a6a84804b73f5317f”,
“Source”: “/var/lib/docker/volumes/8d8547ce96c0840aec9ac071d00afa82bb8fcc91b2906b9a6a84804b73f5317f/_data”,
“Destination”: “/etc/naemon”,
“Driver”: “local”,
“Mode”: “”,
“RW”: true,
“Propagation”: “”
},
{
“Type”: “volume”,
“Name”: “520e1d46b7c4e24aef535757291ccddee97020468f67de694448c77c38f44b7c”,
“Source”: “/var/lib/docker/volumes/520e1d46b7c4e24aef535757291ccddee97020468f67de694448c77c38f44b7c/_data”,
“Destination”: “/var/log/naemon”,
“Driver”: “local”,
“Mode”: “”,
“RW”: true,
“Propagation”: “”
}
],
“Config”: {
“Hostname”: “014fa8dfe046”,
“Domainname”: “”,
“User”: “”,
“AttachStdin”: false,
“AttachStdout”: true,
“AttachStderr”: true,
“ExposedPorts”: {
“80/tcp”: {}
},
“Tty”: false,
“OpenStdin”: false,
“StdinOnce”: false,
“Env”: [
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”,
“ADAGIOS_HOST=adagios.local”,
“ADAGIOS_USER=thrukadmin”,
“ADAGIOS_PASS=thrukadmin”
],
“Cmd”: [
“/usr/sbin/init”
],
“ArgsEscaped”: true,
“Image”: “opinkerfi/adagios-rpm”,
“Volumes”: {
“/etc/naemon”: {},
“/var/log/naemon”: {}
},
“WorkingDir”: “/etc/naemon”,
“Entrypoint”: [
“/bin/bash”,
“/usr/bin/run.sh”
],
“OnBuild”: null,
“Labels”: {
“build-date”: “20161214”,
“license”: “GPLv2”,
“name”: “CentOS Base Image”,
“vendor”: “CentOS”
}
},
“NetworkSettings”: {
“Bridge”: “”,
“SandboxID”: “”,
“HairpinMode”: false,
“LinkLocalIPv6Address”: “”,
“LinkLocalIPv6PrefixLen”: 0,
“Ports”: {},
“SandboxKey”: “”,
“SecondaryIPAddresses”: null,
“SecondaryIPv6Addresses”: null,
“EndpointID”: “”,
“Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“MacAddress”: “”,
“Networks”: {
“bridge”: {
“IPAMConfig”: null,
“Links”: null,
“Aliases”: null,
“NetworkID”: “”,
“EndpointID”: “”,
“Gateway”: “”,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“MacAddress”: “”,
“DriverOpts”: null
}
}
}
}
]

Can anybody help me be able to connect to the webserver that will be running in Docker?

Many Thanks in advance


(Martin Terp) #2

“docker create” only creates the container, then you use “docker start my-adagios”.
If you use “docker run -tid --name=my-adagios -p 8080:80 opinkerfi/adagios-rpm” it will create + start at the same time


(Ftlandrew) #3

Thankyou Terp :slight_smile: