Skip to content

Commit c796999

Browse files
committed
Docker image updates to force user login instead of root
1 parent 8e54e06 commit c796999

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

packaging/docker/centos7/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ RUN chown -R builder:builder /home/builder
7474
# environment variables
7575
ENV CONTAINER=rpmbuild OS=centos DIST=el7
7676

77+
# run as logins as builder
78+
CMD ["su", "-", "builder", "-c", "/bin/bash"]
79+
7780
##
7881

7982
# end rpm build Dockerfile

packaging/docker/centos7/bashrc

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,18 @@
66
# Non-interactive bypass
77
#-------------------------------------------------------------------------------
88

9+
910
[ -z "$PS1" ] && return
1011

11-
# If not running interactively, don't do anything
12-
#case $- in
13-
# *i*) ;;
14-
# *) return ;;
15-
#esac
1612

13+
# ------------------------------------------------------------------------------
14+
# function declarations
15+
# ------------------------------------------------------------------------------
1716

1817
ENV_LIBRARY="$HOME/git/library-utilities/function-library"
1918
CONFIG_DIR="$HOME/.config/bash"
2019
source "$CONFIG_DIR/colors.sh"
2120

22-
23-
# ------------------------------------------------------------------------------
24-
# function declarations
25-
# ------------------------------------------------------------------------------
26-
2721
# indent, x spaces
2822
function indent02() { sed 's/^/ /'; }
2923
function indent04() { sed 's/^/ /'; }

0 commit comments

Comments
 (0)