entrypoint 557 B

1234567891011121314151617
  1. #!/bin/bash -e
  2. #
  3. # This file serves as the main entrypoint to the openshift-ansible image.
  4. #
  5. # For more information see the documentation:
  6. # https://github.com/openshift/openshift-ansible/blob/master/README_CONTAINER_IMAGE.md
  7. # Patch /etc/passwd file with the current user info.
  8. # The current user's entry must be correctly defined in this file in order for
  9. # the `ssh` command to work within the created container.
  10. if ! whoami &>/dev/null; then
  11. echo "${USER:-default}:x:$(id -u):$(id -g):Default User:$HOME:/sbin/nologin" >> /etc/passwd
  12. fi
  13. exec "$@"