From 5497673a7b5a7c07d3e99d77d028447acbdd36a5 Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Wed, 12 Jul 2017 15:18:48 -0400 Subject: image builds: remove dependency on playbook2image We do not need the builder functionality from playbook2image and the resulting image was overly complicated, so this simply builds on Centos/RHEL. --- images/installer/root/usr/local/bin/entrypoint | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 images/installer/root/usr/local/bin/entrypoint (limited to 'images/installer/root/usr/local/bin/entrypoint') diff --git a/images/installer/root/usr/local/bin/entrypoint b/images/installer/root/usr/local/bin/entrypoint new file mode 100755 index 000000000..777bf3f11 --- /dev/null +++ b/images/installer/root/usr/local/bin/entrypoint @@ -0,0 +1,17 @@ +#!/bin/bash -e +# +# This file serves as the main entrypoint to the openshift-ansible image. +# +# For more information see the documentation: +# https://github.com/openshift/openshift-ansible/blob/master/README_CONTAINER_IMAGE.md + + +# Patch /etc/passwd file with the current user info. +# The current user's entry must be correctly defined in this file in order for +# the `ssh` command to work within the created container. + +if ! whoami &>/dev/null; then + echo "${USER:-default}:x:$(id -u):$(id -g):Default User:$HOME:/sbin/nologin" >> /etc/passwd +fi + +exec "$@" -- cgit v1.2.3