Convert Docker to Podman - OK for Rails, Problem for Jekyll

People,

I finally had time (not really) to look at moving my Rails and Jekyll web sites from Docker to Podman. The first Rails conversion eventually worked but I struggled for a long time with a Jekyll site which still isn’t working.

I docker exported to a tar file and podman imported the tar file.

For a Jekyll site I have just been making use of an old setup in a container to run the builds on the source on host machine eg:

docker run -v $(pwd):/srv/jekyll
-p 127.0.0.1:4000:4000
–name jekyll_baco
-dit jekyll/jekyll:server jekyll s

I did the same thing and other variations but keep getting “connection refused” when trying to look at localhost:4000 .

I was going to attach the output of the docker and podman (of the most recent attempt) inspect commands - I can see that there seems to be a problem for HostConhfig-PortBindings at least . . but can’t attach txt files - I will preformatted text below . . not sure where to try next . .

Any help is greatly appreciated!

Regards,

Phil.

[
    {
        "Id": "e8d0f30eb6d3fa29a5ec273e6a3ae256dcea349636308e7ac69d7dd4296cde3b",
        "Created": "2017-05-23T04:44:21.311473561Z",
        "Path": "jekyll",
        "Args": [
            "s",
            "--host",
            "0.0.0.0",
            "--port",
            "4000",
            "-w"
        ],
        "State": {
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 1,
            "Error": "",
            "StartedAt": "2019-05-05T11:54:28.143454254Z",
            "FinishedAt": "2019-05-05T11:59:54.231731648Z"
        },
        "Image": "sha256:27de2c852ba9fe27bf10579f4720f247c55c46c97ccedae14e96af89a54e9b19",
        "ResolvConfPath": "/home/docker/containers/e8d0f30eb6d3fa29a5ec273e6a3ae256dcea349636308e7ac69d7dd4296cde3b/resolv.conf",
        "HostnamePath": "/home/docker/containers/e8d0f30eb6d3fa29a5ec273e6a3ae256dcea349636308e7ac69d7dd4296cde3b/hostname",
        "HostsPath": "/home/docker/containers/e8d0f30eb6d3fa29a5ec273e6a3ae256dcea349636308e7ac69d7dd4296cde3b/hosts",
        "LogPath": "",
        "Name": "/jekyll_baco",
        "RestartCount": 0,
        "Driver": "devicemapper",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/home/0_www/jekyll/baco_skytran:/tmp/jekyll"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "journald",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {
                "4000/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "4000"
                    }
                ]
            },
            "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": "oci",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 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": "devicemapper",
            "Data": {
                "DeviceId": "85",
                "DeviceName": "docker-8:5-53088587-9a1fec71bd9d50a6c382e940adc0f99b6ece2f2d145882a282ea639d656dcd6b",
                "DeviceSize": "10737418240"
            }
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/home/0_www/jekyll/baco_skytran",
                "Destination": "/tmp/jekyll",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "e8d0f30eb6d3",
            "Domainname": "",
            "User": "",
            "AttachStdin": true,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "4000/tcp": {}
            },
            "Tty": true,
            "OpenStdin": true,
            "StdinOnce": true,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "REFRESHED_AT=2015-11-25"
            ],
            "Cmd": [
                "s",
                "--host",
                "0.0.0.0",
                "--port",
                "4000",
                "-w"
            ],
            "Image": "irakli/jekyll",
            "Volumes": null,
            "WorkingDir": "/tmp/jekyll",
            "Entrypoint": [
                "jekyll"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "f8568e4749ae818c0123458166b5a6cfc008dd452fce201bcc0fcedcec29f1a9",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": null,
            "SandboxKey": "/var/run/docker/netns/f8568e4749ae",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "6eda375301a34172191c0e632d1836580334098312ec88b89f89bbac34a154f7",
                    "EndpointID": "",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": ""
                }
            }
        }
    }
]


[
    {
        "ID": "ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531",
        "Created": "2019-05-06T03:41:37.47506659+10:00",
        "Path": "jekyll",
        "Args": [
            "s",
            "--host",
            "127.0.0.1:4000",
            "-w"
        ],
        "State": {
            "OciVersion": "1.0.1-dev",
            "Status": "stopped",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 16454,
            "ExitCode": 1,
            "Error": "",
            "StartedAt": "2019-05-06T03:41:38.051187195+10:00",
            "FinishedAt": "2019-05-06T03:47:25.714745295+10:00",
            "Healthcheck": {
                "Status": "",
                "FailingStreak": 0,
                "Log": null
            }
        },
        "Image": "f76f5b823b1d3ae2167c74198cd3f193eabf4130056c19945fbdad81329d498c",
        "ImageName": "localhost/jekyll_baco:latest",
        "Rootfs": "",
        "ResolvConfPath": "/var/run/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata/resolv.conf",
        "HostnamePath": "/var/run/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata/hostname",
        "HostsPath": "/var/run/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata/hosts",
        "StaticDir": "/var/lib/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata",
        "LogPath": "/var/lib/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata/ctr.log",
        "ConmonPidFile": "",
        "Name": "musing_curie",
        "RestartCount": 0,
        "Driver": "overlay",
        "MountLabel": "system_u:object_r:container_file_t:s0:c340,c831",
        "ProcessLabel": "system_u:system_r:container_t:s0:c340,c831",
        "AppArmorProfile": "",
        "EffectiveCaps": [
            "CAP_CHOWN",
            "CAP_DAC_OVERRIDE",
            "CAP_FSETID",
            "CAP_FOWNER",
            "CAP_MKNOD",
            "CAP_NET_RAW",
            "CAP_SETGID",
            "CAP_SETUID",
            "CAP_SETFCAP",
            "CAP_SETPCAP",
            "CAP_NET_BIND_SERVICE",
            "CAP_SYS_CHROOT",
            "CAP_KILL",
            "CAP_AUDIT_WRITE"
        ],
        "BoundingCaps": [
            "CAP_CHOWN",
            "CAP_DAC_OVERRIDE",
            "CAP_FSETID",
            "CAP_FOWNER",
            "CAP_MKNOD",
            "CAP_NET_RAW",
            "CAP_SETGID",
            "CAP_SETUID",
            "CAP_SETFCAP",
            "CAP_SETPCAP",
            "CAP_NET_BIND_SERVICE",
            "CAP_SYS_CHROOT",
            "CAP_KILL",
            "CAP_AUDIT_WRITE"
        ],
        "ExecIDs": [
            "9eb8420edb97540c59bb9c7f7c4b50af8b29b635c8e4b69bc93675cb2b66a19c"
        ],
        "GraphDriver": {
            "Name": "overlay",
            "Data": {
                "LowerDir": "/var/lib/containers/storage/overlay/dcf73bcc9b2eb1c7101bde4fff66d4c34a10a45a918bf44c4a1278e5aac26c1f/diff",
                "MergedDir": "/var/lib/containers/storage/overlay/4f7b52a4993e802ad01770fd21c2ecf5d31bb4ef542f81f2f053c3d687dc3184/merged",
                "UpperDir": "/var/lib/containers/storage/overlay/4f7b52a4993e802ad01770fd21c2ecf5d31bb4ef542f81f2f053c3d687dc3184/diff",
                "WorkDir": "/var/lib/containers/storage/overlay/4f7b52a4993e802ad01770fd21c2ecf5d31bb4ef542f81f2f053c3d687dc3184/work"
            }
        },
        "Mounts": [
            {
                "destination": "/proc",
                "type": "proc",
                "source": "proc",
                "options": [
                    "nosuid",
                    "noexec",
                    "nodev"
                ]
            },
            {
                "destination": "/dev",
                "type": "tmpfs",
                "source": "tmpfs",
                "options": [
                    "nosuid",
                    "strictatime",
                    "mode=755",
                    "size=65536k"
                ]
            },
            {
                "destination": "/sys",
                "type": "sysfs",
                "source": "sysfs",
                "options": [
                    "nosuid",
                    "noexec",
                    "nodev",
                    "ro"
                ]
            },
            {
                "destination": "/dev/pts",
                "type": "devpts",
                "source": "devpts",
                "options": [
                    "nosuid",
                    "noexec",
                    "newinstance",
                    "ptmxmode=0666",
                    "mode=0620",
                    "gid=5"
                ]
            },
            {
                "destination": "/dev/mqueue",
                "type": "mqueue",
                "source": "mqueue",
                "options": [
                    "nosuid",
                    "noexec",
                    "nodev"
                ]
            },
            {
                "destination": "/dev/shm",
                "type": "bind",
                "source": "/var/lib/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata/shm",
                "options": [
                    "bind",
                    "private"
                ]
            },
            {
                "destination": "/etc/hostname",
                "type": "bind",
                "source": "/var/run/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata/hostname",
                "options": [
                    "bind",
                    "private"
                ]
            },
            {
                "destination": "/run/.containerenv",
                "type": "bind",
                "source": "/var/run/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata/.containerenv",
                "options": [
                    "bind",
                    "private"
                ]
            },
            {
                "destination": "/run/secrets",
                "type": "bind",
                "source": "/var/run/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata/run/secrets",
                "options": [
                    "bind",
                    "private"
                ]
            },
            {
                "destination": "/etc/resolv.conf",
                "type": "bind",
                "source": "/var/run/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata/resolv.conf",
                "options": [
                    "bind",
                    "private"
                ]
            },
            {
                "destination": "/etc/hosts",
                "type": "bind",
                "source": "/var/run/containers/storage/overlay-containers/ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531/userdata/hosts",
                "options": [
                    "bind",
                    "private"
                ]
            },
            {
                "destination": "/sys/fs/cgroup",
                "type": "cgroup",
                "source": "cgroup",
                "options": [
                    "rprivate",
                    "nosuid",
                    "noexec",
                    "nodev",
                    "relatime",
                    "ro"
                ]
            }
        ],
        "Dependencies": [],
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": [
                {
                    "hostPort": 4000,
                    "containerPort": 4000,
                    "protocol": "tcp",
                    "hostIP": "127.0.0.1"
                }
            ],
            "SandboxKey": "/var/run/netns/cni-e9de248f-f593-94c0-6fdc-7ed972c26950",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "10.88.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "10.88.0.57",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "9a:1b:9d:20:c3:34"
        },
        "ExitCommand": [
            "/usr/bin/podman",
            "--root",
            "/var/lib/containers/storage",
            "--runroot",
            "/var/run/containers/storage",
            "--log-level",
            "error",
            "--cgroup-manager",
            "systemd",
            "--tmpdir",
            "/var/run/libpod",
            "--runtime",
            "runc",
            "--storage-driver",
            "overlay",
            "container",
            "cleanup",
            "ddbcdbc003fd2272db314014bd9a2849b966ccc3be98b3ee47001dd3f6f88531"
        ],
        "Namespace": "",
        "IsInfra": false,
        "HostConfig": {
            "ContainerIDFile": "",
            "LogConfig": null,
            "NetworkMode": "bridge",
            "PortBindings": null,
            "AutoRemove": false,
            "CapAdd": [],
            "CapDrop": [],
            "DNS": [],
            "DNSOptions": [],
            "DNSSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "",
            "Cgroup": "host",
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": [],
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 65536000,
            "Runtime": "runc",
            "ConsoleSize": null,
            "CpuShares": null,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": null,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": null,
            "CpuQuota": null,
            "CpuRealtimePeriod": null,
            "CpuRealtimeRuntime": null,
            "CpuSetCpus": "",
            "CpuSetMems": "",
            "Devices": null,
            "DiskQuota": 0,
            "KernelMemory": null,
            "MemoryReservation": null,
            "MemorySwap": null,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": [],
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "Tmpfs": []
        },
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": {
                "uid": 0,
                "gid": 0
            },
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": true,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "TERM=xterm",
                "HOSTNAME=",
                "container=podman"
            ],
            "Cmd": [
                "jekyll",
                "s",
                "--host",
                "127.0.0.1:4000",
                "-w"
            ],
            "Image": "localhost/jekyll_baco:latest",
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": "",
            "Labels": {
                "jekyll": ""
            },
            "Annotations": {
                "io.kubernetes.cri-o.ContainerType": "sandbox",
                "io.kubernetes.cri-o.TTY": "true"
            },
            "StopSignal": 15
        }
    }
]

What if you change the -p 127.0.0.1:4000:4000 to -p 4000:4000 (i.e. drop the IP)?