Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to CentOS 8 and support command-line arguments #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ifireball
Copy link

@ifireball ifireball commented Dec 2, 2019

  1. Rebased the image on the Fadora 31 image because:
    1. We want a newer version of systemd that can return error values
    2. RHEL/CentOS 8 containers cannot manipulate the firewall properly if they run on RHEL 7
      hosts because their userspace tools only support nft and not iptables. In Fedora we can
      still install the legacy iptables tools
  2. Removed all env-var handling code as its basically superseded by the
    systemd PassEnvironment option that can be specified on a
    per-unit-file basis
  3. Made systemd and journald output go to /dev/console which should be
    collected by the container engine automatically
  4. Made a new service unit file that tries to run the arguments given
    to the container as commands after all systemd services have started
    and exit the container once those commands are done while returning
    an appropriate return value.
  5. It is possible to have environment variables passed to the invoked
    commands by setting variable names in the ARGS_ENV_INCLUDE variable
    either when launching the container or when building derived
    containers

Note: The CentOs version upgrade is required, among other things,
because the systemd version in CentOS 7 does not support returning
exit codes on exit.

Note: Certain versions of Docker have an issue with collecting
/dev/console properly. See the following for explanation:

Signed-off-by: Barak Korren [email protected]

1. Rebased the image on the fedora:31 image
2. Removed all env-var handling code as its basically superseded by the
   systemd `PassEnvironment` option that can be specified on a
   per-unit-file basis
3. Made systemd and journald output go to `/dev/console` which should be
   collected by the container engine automatically
4. Made a new service unit file that tries to run the arguments given
   to the container as commands after all systemd services have started
   and exit the container once those commands are done while returning
   an appropriate return value.
5. It is possible to have environment variables passed to the invoked
   commands by setting variable names in the `ARGS_ENV_INCLUDE` variable
   either when launching the container or when building derived
   containers

Note: The CentOs version upgrade is required, among other things,
because the `systemd` version in CentOS 7 does not support returning
exit codes on exit.

Note: Certain versions of Docker have an issue with collecting
`/dev/console` properly. See the following for explanation:

- systemd/systemd#4262
- moby/moby#27202
- https://bugzilla.redhat.com/show_bug.cgi?id=1373780

This image also include a workaround for the following Podman issue:

- containers/podman#4625

Signed-off-by: Barak Korren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant