RHEL containers on non-RHEL hosts
I now do most of my development work in a setup based on RPM-OSTree with my own trees , and doing most of my development work inside containers .
However, I do still work for Red Hat, so would like to test stuff against Red Hat Enterprise linux-based platforms, but as you might be aware getting the required entitlements setup is considered "difficult", so I did as probably a lot of people do: I used CentOS containers, just because they don't require fiddling with the entitlement stuff.
The other day, however, I decided that enough is enough and that I need to eat our own dogfood, so that I need to finally get it set up. Now, if I were just running a RHEL host as development machine itself, it would figure itself out all automatically, but obviously I don't do that, working for Fedora Infrastructure et al, so I set out to figure out how to get it working on a Fedora host.
Turns out: it's not actually that difficult as people make it to be, so let me write down how I got it working.
Note: This requires the "Docker Super Secrets" patch. If you don't have this patch (it's in the Fedora/RHEL distribution of docker), you will need to manually copy/mount the directory. I'll explain that at the end of this post.
Note 2: You will only be able to follow this when you have actual RHEL entitlements. This will NOT help you get around that, only explain how to use your existing RHEL entitlements.Setting it up
First off, open a terminal on the host and touch a file in /usr/share/rhel/secrets/ to make sure that this directory is writable (it's not on ostree-based deployments, which means you'll need to bind-mount it to a directory that is with something like "mount --bind /home/secret/ /usr/share/rhel/secrets/").
Now, inside this directory, create the following directory structure:
本文系统（linux）相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统