On 2019-08-05 14:15, Peter Hunt wrote:
This is because the network configuration is stored in the infra
container
(the creator and holder of the network namespace). I definitely think this
should be easier to access, but you can get the IP address by doing the
following:
`podman ps -a | grep infra` will get you the container ID of the infra
container
`podman inspect --format "{{.NetworkSettings}}" $INFRA_ID` will get you the
IP address.
We should also look into adding this into `podman pod inspect`, and
potentially making `podman inspect` on the container return config
information for the container we share a network namespace with.
On Mon, Aug 5, 2019 at 2:08 PM <nikolaj(a)majorov.biz> wrote:
> Hi I running container in pod and it is not getting an ip address.
>
> sudo podman pod create --name drupal -p 3306 -p 8080:80 -p 8443:443
>
>
> sudo podman run --pod drupal \
> -e MARIADB_USER=bn_drupal \
> -e MARIADB_PASSWORD=drupal \
> -e MARIADB_ROOT_PASSWORD=redhat \
> -e MARIADB_DATABASE=bitnami_drupal \
> --volume mariadb_data:/bitnami \
> --rm -it docker.io/bitnami/mariadb:10.3
>
> so then I inspect network setting of container in the pod it is not
> getting an ip address:
> podman inspect --format "{{.NetworkSettings}}" 05905843e7d6
> { false 0 [] [] [] 0 0 }
>
> if I run same container without a pod I get an ip address:
>
> sudo podman run
> -e MARIADB_USER=bn_drupal \
> -e MARIADB_PASSWORD=drupal \
> -e MARIADB_ROOT_PASSWORD=redhat \
> -e MARIADB_DATABASE=bitnami_drupal \
> --volume mariadb_data:/bitnami \
> --rm -it docker.io/bitnami/mariadb:10.3
>
> podman inspect --format "{{.NetworkSettings}}" 3f760c0aad51
> { false 0 [] /var/run/netns/cni-b8f71228-9609-8585-5952-4112548c737b []
> [] 10.88.0.1 0 10.88.0.7 16 92:62:fd:37:1b:bb}
>
> why it happens ?
> is there something I forget or missing ?
>
> [vagrant@localhost ~]$ podman version
> Version: 1.4.4
> RemoteAPI Version: 1
> Go Version: go1.12.7
> OS/Arch: linux/amd64
> _______________________________________________
> Podman mailing list -- podman(a)lists.podman.io
> To unsubscribe send an email to podman-leave(a)lists.podman.io
>
_______________________________________________
Podman mailing list -- podman(a)lists.podman.io
To unsubscribe send an email to podman-leave(a)lists.podman.io