2.6. Containerfile에서 사용자 및 그룹 구성


인프라 전체에서 일관된 권한을 유지하려면 Containerfile에서 영구 사용자 및 그룹을 정의합니다. 이렇게 하면 bootc 스위치 를 통해 호스트를 마이그레이션할 때 권한이 그대로 유지됩니다.

중요

사용자 및 그룹 ID는 rhel-bootc 이미지와 에지용 RHEL마다 다릅니다. 이는 ssh_keys 와 같은 여러 그룹 및 사용자에게 영향을 미칩니다. 결과적으로 개인 키는 잘못 구성된 ID가 있는 그룹에 속하며 공개 키를 사용하여 에지 시스템에 액세스할 수 없습니다.

사전 요구 사항

프로세스

  1. RHEL for Edge 시스템에서 사용자 및 그룹 정보를 추출합니다.

    $ mkdir -p ./usr/lib
    $ ssh admin@192.168.100.50 'cat /lib/passwd' > ./usr/lib/passwd
    $ ssh admin@192.168.100.50 'cat /lib/group' > ./usr/lib/group
  2. Containerfile에서 지정하여 bootc 기반 시스템에 누락된 RHEL for Edge 패키지를 포함합니다. 또한 COPY 명령을 사용하여 RHEL for Edge 시스템에서 추출한 그룹passwd 콘텐츠를 포함합니다. 다음은 예제입니다.

    FROM registry.redhat.io/rhel9/rhel-bootc
    WORKDIR /tmp
    RUN dnf -y install ModemManager \
                       NetworkManager-wifi \
                       NetworkManager-wwan \
                       audit \
                       checkpolicy \
                       clevis \
                       clevis-dracut \
                       clevis-luks \
                       clevis-pin-tpm2 \
                       clevis-systemd \
                       containernetworking-plugins \
                       dnsmasq \
                       dracut-config-generic \
                       fdo-client \
                       fdo-owner-cli \
                       firewalld \
                       firewalld-filesystem \
                       greenboot \
                       greenboot-default-health-checks \
                       grubby \
                       ignition \
                       ignition-edge \
                       ipset \
                       iwl100-firmware \
                       iwl1000-firmware \
                       iwl105-firmware \
                       iwl135-firmware \
                       iwl2000-firmware \
                       iwl2030-firmware \
                       iwl3160-firmware \
                       iwl5000-firmware \
                       iwl5150-firmware \
                       iwl6050-firmware \
                       iwl7260-firmware \
                       libsecret \
                       pinentry \
                       policycoreutils-python-utils \
                       python3-distro \
                       python3-setools \
                       rsync \
                       setools-console \
                       tmux \
                       traceroute \
                       usbguard \
                       usbguard-selinux \
                       wireless-regdb \
                       wpa_supplicant
    
    COPY etc /etc
    # You can find the passwd and group content that were extracted from the RHEL for Edge system usr/lib/ in your current working directory. You can copy the content into the container image with the following step:
    COPY usr /usr
  3. bootc 이미지를 빌드하고 레지스트리로 푸시합니다.

    $ podman build -f Containerfile -t quay.io/<namespace>/<image>:<tag> .
    $ podman push quay.io/<namespace>/<image>:<tag>
  4. 엣지 호스트를 새 이미지로 전환하고 재부팅합니다.

    $ ssh admin@192.168.100.50
    $ sudo bootc switch quay.io/<namespace>/<image>:<tag>
    $ sudo reboot

검증

/lib/passwd/lib/group 의 콘텐츠가 원래 OSTree 시스템과 일치하는지 확인합니다.

  1. /lib/passwd 의 내용을 확인합니다.

    $ cat /lib/passwd
  2. /lib/group 의 내용을 확인합니다.

    $ cat /lib/group
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동