-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add entrypoint; change Dockerfile relative paths
- Loading branch information
1 parent
2bc1a2d
commit 8a82808
Showing
5 changed files
with
46 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/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/source-to-image/blob/master/docs/builder_image.md | ||
|
||
|
||
# Patch /etc/passwd file with the local user info. | ||
# A user (name) must be defined in this file in order for | ||
# the `ssh` command to work within the created container. | ||
|
||
if [[ -z $USER ]]; | ||
then | ||
USER=default | ||
fi | ||
|
||
# patch /etc/passwd with a username when running under a non-root user | ||
# in order for some commands, like `ssh` to work properly. | ||
if ! whoami &>/dev/null; then | ||
echo "$USER:x:$(id -u):$(id -g):Default User:$HOME:/sbin/nologin" >> /etc/passwd | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters