Problem running docker image from my own repo

I have a repo in docker hub named shaktidocker and i is public. I have a image in the repo.

When i am trying to run that image from my local docker development host, i gives me below error:

# docker run -P -d shaktidocker/docker-spring-boot-demo
e75c891fa5403b0bb6ed1aa3b5e6a6760d4707219ecaff22727632cca741fa25
/usr/bin/docker-current: Error response from daemon: linux spec user: unable to find user shaktidocker: no matching entries in passwd file.

When I am trying t run a different image from different public repo, it works perfectly fine.

Please, advise

Hi :slight_smile:

This is something in the image, like, maybe you’re starting a process for a user that dosnt exsist.
Can you share your dockerfile?

Please, check tehe attached dockerfileDockerfile.txt (119 Bytes)

I haven’t mentioned any user in my dockerfile.

If I am pulling and running any other public repo image, that is working fine but not my own repo/image.

For example, I used below image.

docker run -P -d nginxdemos/hello

Below is the dockerfile

FROM nginx:mainline-alpine
RUN rm /etc/nginx/conf.d/*
ADD hello.conf /etc/nginx/conf.d/
ADD index.html /usr/share/nginx/html/

For this image, I am not getting any error but the image which I kept in my own repo and want run it, causing me problem and asking for user in my local docker host.

Plz advise.

How do you submit to hub?

Because when you use : docker image inspect shaktidocker/docker-spring-boot-demo
you can see that it wants to run the java application as shaktidocker

If i run:
docker run -tid -u root shaktidocker/docker-spring-boot-demo

it works, so im not sure where in the process you define which user it should run on

Thanks and appreciate your quick response. :slight_smile:

I used the below command to push the image to hub

docker push shaktidocker/docker-spring-boot-demo

Hi,

When i did the image inspect I got this below. I highlighted the in bold where the shaktidocker is used but that is the repo name which I guess is required to push to the hub

[
{
“Id”: “da38b080e24257ad69e744beac836a29ef8bc855f0c6bc32e7d5f038225483b9”,
“Created”: “2018-11-15T04:50:33.796158916Z”,
“Path”: “java”,
“Args”: [
“-jar”,
“docker-demo.jar”
],
“State”: {
“Status”: “exited”,
“Running”: false,
“Paused”: false,
“Restarting”: false,
“OOMKilled”: false,
“Dead”: false,
“Pid”: 0,
“ExitCode”: 143,
“Error”: “”,
“StartedAt”: “2018-12-06T22:12:34.501553277Z”,
“FinishedAt”: “2018-12-06T22:13:49.413375272Z”
},
“Image”: “sha256:3ed1a0dd5593bede2ee2468918dedc63ecbbf5f881fb4bd11019338ce8311a17”,
“ResolvConfPath”: “/mnt/sda1/var/lib/docker/containers/da38b080e24257ad69e744beac836a29ef8bc855f0c6bc32e7d5f038225483b9/resolv.conf”,
“HostnamePath”: “/mnt/sda1/var/lib/docker/containers/da38b080e24257ad69e744beac836a29ef8bc855f0c6bc32e7d5f038225483b9/hostname”,
“HostsPath”: “/mnt/sda1/var/lib/docker/containers/da38b080e24257ad69e744beac836a29ef8bc855f0c6bc32e7d5f038225483b9/hosts”,
“LogPath”: “/mnt/sda1/var/lib/docker/containers/da38b080e24257ad69e744beac836a29ef8bc855f0c6bc32e7d5f038225483b9/da38b080e24257ad69e744beac836a29ef8bc855f0c6bc32e7d5f038225483b9-json.log”,
“Name”: “/docker-spring-boot-demo”,
“RestartCount”: 0,
“Driver”: “aufs”,
“Platform”: “linux”,
“MountLabel”: “”,
“ProcessLabel”: “”,
“AppArmorProfile”: “”,
“ExecIDs”: null,
“HostConfig”: {
“Binds”: null,
“ContainerIDFile”: “”,
“LogConfig”: {
“Type”: “json-file”,
“Config”: {}
},
“NetworkMode”: “default”,
“PortBindings”: {
“8899/tcp”: [
{
“HostIp”: “”,
“HostPort”: “9911”
}
]
},
“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”: [
33,
105
],
“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”: null,
“Name”: “aufs”
},
“Mounts”: ,
“Config”: {
“Hostname”: “da38b080e242”,
“Domainname”: “”,
“User”: “”,
“AttachStdin”: false,
“AttachStdout”: true,
“AttachStderr”: true,
“ExposedPorts”: {
“8899/tcp”: {}
},
“Tty”: false,
“OpenStdin”: false,
“StdinOnce”: false,
“Env”: [
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”,
“LANG=C.UTF-8”,
“JAVA_HOME=/docker-java-home”,
“JAVA_VERSION=8u171”,
“JAVA_DEBIAN_VERSION=8u171-b11-1~deb9u1”,
“CA_CERTIFICATES_JAVA_VERSION=20170531+nmu1”
],
“Cmd”: null,
“ArgsEscaped”: true,
"Image": “shaktidocker/docker-spring-boot-demo”,
“Volumes”: null,
“WorkingDir”: “”,
“Entrypoint”: [
“java”,
“-jar”,
“docker-demo.jar”
],
“OnBuild”: null,
“Labels”: {}
},
“NetworkSettings”: {
“Bridge”: “”,
“SandboxID”: “24ddae4964e92dc2d2e284858e9ec76ee2c18961ef7e3467ffbe6a9648fc28f1”,
“HairpinMode”: false,
“LinkLocalIPv6Address”: “”,
“LinkLocalIPv6PrefixLen”: 0,
“Ports”: {},
“SandboxKey”: “/var/run/docker/netns/24ddae4964e9”,
“SecondaryIPAddresses”: null,
“SecondaryIPv6Addresses”: null,
“EndpointID”: “”,
“Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“MacAddress”: “”,
“Networks”: {
“bridge”: {
“IPAMConfig”: null,
“Links”: null,
“Aliases”: null,
“NetworkID”: “0505cb4c61e077bfa96f1640f3a2ce3ddf44790b6fefd5e47aa7fc8c0163ac00”,
“EndpointID”: “”,
“Gateway”: “”,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“MacAddress”: “”,
“DriverOpts”: null
}
}
}
}
]