Debian /bin/sh in a Docker container never seems to look at .profile
3
votes
1
answer
893
views
I can not seem to get [dash](https://manpages.debian.org/bullseye/dash/dash.1.en.html) to look at $HOME/.profile:
pedz@Peace:s001 ~[S:hatred] % docker exec -it hatred-web-1 dash -i
# cat $HOME/.profile
PROOF=true; export PROOF
PATH=/hatred/bin:$PATH; export PATH
# env | sort
BUNDLE_APP_CONFIG=/usr/local/bundle
BUNDLE_SILENCE_ROOT_WARNING=1
GEM_HOME=/usr/local/bundle
HOME=/root
HOSTNAME=hatred
LANG=C.UTF-8
PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/hatred
RUBY_DOWNLOAD_SHA256=ca10d017f8a1b6d247556622c841fc56b90c03b1803f87198da1e4fd3ec3bf2a
RUBY_MAJOR=3.1
RUBY_VERSION=3.1.2
TERM=xterm
# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 14:28 ? 00:00:01 puma 5.6.5 (tcp://0.0.0.0:3000) [hatred]
root 152 0 0 14:54 pts/0 00:00:00 dash -i
root 161 152 0 14:54 pts/0 00:00:00 ps -ef
# set
BUNDLE_APP_CONFIG='/usr/local/bundle'
BUNDLE_SILENCE_ROOT_WARNING='1'
GEM_HOME='/usr/local/bundle'
HOME='/root'
HOSTNAME='hatred'
IFS='
'
LANG='C.UTF-8'
OPTIND='1'
PATH='/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
PPID='0'
PS1='# '
PS2='> '
PS4='+ '
PWD='/hatred'
RUBY_DOWNLOAD_SHA256='ca10d017f8a1b6d247556622c841fc56b90c03b1803f87198da1e4fd3ec3bf2a'
RUBY_MAJOR='3.1'
RUBY_VERSION='3.1.2'
TERM='xterm'
_='-ef'
# lsb_release -c
Codename: bullseye
# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/ "
SUPPORT_URL="https://www.debian.org/support "
BUG_REPORT_URL="https://bugs.debian.org/ "
#
Note that PROOF is not in env's output and PATH does not have /hatred/bin
prepended to it.
Asked by pedz
(173 rep)
Sep 23, 2022, 03:08 PM
Last activity: Apr 13, 2023, 05:37 AM
Last activity: Apr 13, 2023, 05:37 AM