Rhel 9 container network acces description explanation.

Posted on

Hello,

I am currently running rhel 9 to get familiar with server os.
I have no experience any further with server os.
Now i got Rhel running and also started a container from an image.

My long term goal is to run an efficient server for multiple ends.

Homeassistant (home automation)
Plex
Web ( in the future)
Nas

Got some questions that are hard to google actually.
They can be found but its stil complicated.
You may suggest to start with other server software but thats not who I am as a person. Its al about spending time at a specific program task software and you are superior at youre expertise.

My question is what am I exactly doing with these 2 image puls and making the container run.

  1. ( found on the redhat website itself but its not working outside the container. Meaning cannot acces the container network)
    (1.1) podman pull docker.io/homeassistant/home-assistant:stable
    (1.2 mkdir ~/hass_config
    (1.3) podman run --init -d \
    --name homeassistant \
    --restart=unless-stopped \
    -v /etc/localtime:/etc/localtime:ro \
    -v ~/hass_config:/config:Z \
    --network=host \
    homeassistant/home-assistant:stable

http://127.0.0.1:8123/ this would be the adress to reach the image in the container but thats not working because when inspecting the container there is no port assigned. If someone could break down my command in peaces what I am asking to do.

  • https://www.redhat.com/sysadmin/automate-your-home
    Thats where i got these steps from.
  1. Found on github and it does work after this command but I want to understand how did I exactly gave my container network acces and is it stil secured or are the more secure ways to Rome?

(Cant find image. Currently on vacation. Will update.)

I want to learn how professional server company keep there server safe from the outside. Could anybody guide me a little bit:)

Deeply appreciated!

Responses