Hi, I install docker from powershell instead of docker desktop and i am running as docker container.
I have create an image my self running installing the application in the windows based container.
FROM mcr.microsoft.com/windows/servercore:ltsc2019
WORKDIR C:\\Dependency
COPY . C:\\Dependency
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN Start-Process 'C:\Dependency\Memurai-Developer-v2.0.3.msi' '/qn' -PassThru | Wait-Process;
EXPOSE 6379
I can ran it properly with docker run -p 6379:6379 -it memurai
The application ran no problem inside the container, but when i try to use my host to connect to the port with the container private Ip, i can’t get the connection.
[
{
"Id": "2f083afdfe7047175580bb29669fc3214c0ac5538959875fa06be11977e71c3c",
"Created": "2021-08-16T14:49:25.0842833Z",
"Path": "c:\\windows\\system32\\cmd.exe",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 1124,
"ExitCode": 0,
"Error": "",
"StartedAt": "2021-08-16T14:49:26.0576582Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:85037281aeb3fcc32c365a1bc964e1fcecb90046c5e86d75b6d308e970053808",
"ResolvConfPath": "",
"HostnamePath": "",
"HostsPath": "",
"LogPath": "C:\\ProgramData\\docker\\containers\\2f083afdfe7047175580bb29669fc3214c0ac5538959875fa06be11977e71c3c\\2f083afdfe7047175580bb29669fc3214c0ac5538959875fa06be11977e71c3c-json.log",
"Name": "/gifted_moore",
"RestartCount": 0,
"Driver": "windowsfilter",
"Platform": "windows",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"6379/tcp": [
{
"HostIp": "",
"HostPort": "6379"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "",
"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": 0,
"ConsoleSize": [
43,
94
],
"Isolation": "process",
"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,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": null,
"ReadonlyPaths": null
},
"GraphDriver": {
"Data": {
"dir": "C:\\ProgramData\\docker\\windowsfilter\\2f083afdfe7047175580bb29669fc3214c0ac5538959875fa06be11977e71c3c"
},
"Name": "windowsfilter"
},
"Mounts": [],
"Config": {
"Hostname": "2f083afdfe70",
"Domainname": "",
"User": "",
"AttachStdin": true,
"AttachStdout": true,
"AttachStderr": true,
"ExposedPorts": {
"6379/tcp": {}
},
"Tty": true,
"OpenStdin": true,
"StdinOnce": true,
"Env": null,
"Cmd": [
"c:\\windows\\system32\\cmd.exe"
],
"Image": "memurai",
"Volumes": null,
"WorkingDir": "C:\\Dependency",
"Entrypoint": null,
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "2f083afdfe7047175580bb29669fc3214c0ac5538959875fa06be11977e71c3c",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"6379/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "6379"
}
]
},
"SandboxKey": "2f083afdfe7047175580bb29669fc3214c0ac5538959875fa06be11977e71c3c",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"nat": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "e27caf1b6d14f53b6f7e3d14a94b83df81da70035e9fb8410c8235b401987328",
"EndpointID": "5c732645c91744ed314d95b857c9cc0a2fba6e28b0fb174b34143d7c0be8ca61",
"Gateway": "192.168.128.1",
"IPAddress": "192.168.135.190",
"IPPrefixLen": 24,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "00:15:5d:ea:ab:98",
"DriverOpts": null
}
}
}
}
]