Ruddy32
Ruddy32

Reputation: 81

running postgresql image with podman failed

When running postgresql alpine image with podman :

podman run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=test -e POSTGRES_USER=test -d postgres:11-alpine

the result is :

Error: /usr/bin/slirp4netns failed: "open(\"/dev/net/tun\"): No such device\nWARNING: Support for sandboxing is experimental\nchild failed(1)\nWARNING: Support for sandboxing is experimental\n"

The running system is archlinux. Is there a way to fix this error or a turn arround ?

Thanks

Upvotes: 0

Views: 3612

Answers (2)

Eduard Wirch
Eduard Wirch

Reputation: 9922

I assume you upgraded Arch packages recently. Most likely your system needs a restart.

Upvotes: 1

kanelbulleproductions
kanelbulleproductions

Reputation: 101

  1. Is slirp4netns correctly installed? Check the project Site for information.

  2. Sometimes the flag order matters. try -d first and -p last (directly infornt of the image) looking like:

    • podman run -d --name postgres -e POSTGRES_PASSWORD=test -e POSTGRES_USER=test -p 5432:5432 postgres:11-alpine
  3. Try only creating the neccessary password, then log into your container and create manually (this always worked for me)

    1. podman run -d --name postgres -e POSTGRES_PASSWORD=test -p 5432:5432 postgres:11-alpline
      1. podman exec -it postgres bash
      2. Create default user postgres
        • su - postgres
      3. start postgres
        • psql
      4. create databases and tables
        • CREATE USER testuser WITH PASSWORD 'testpassword' | Doku
        • CREATE DATABASE testdata WITH OWNER testuser
      5. Check if it worked
        • \l+
    2. Connect to your Database via IP and Port

Upvotes: 1

Related Questions