mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-06 22:31:18 +00:00
Simplify Dockerfile even more.
Fix PS1.
This commit is contained in:
parent
ba0c738723
commit
acc0fba604
2 changed files with 10 additions and 11 deletions
|
@ -3,18 +3,11 @@ FROM debian:bookworm-slim
|
||||||
# Set debconf to run non-interactively
|
# Set debconf to run non-interactively
|
||||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||||
|
|
||||||
# Install _only_ the necessary packages
|
# Install only the necessary packages
|
||||||
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
|
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
|
||||||
locales \
|
|
||||||
nano \
|
nano \
|
||||||
procps
|
procps
|
||||||
|
|
||||||
# Set the locale
|
|
||||||
#RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
|
||||||
#ENV LANG en_US.UTF-8
|
|
||||||
#ENV LANGUAGE en_US:en
|
|
||||||
#ENV LC_ALL en_US.UTF-8
|
|
||||||
|
|
||||||
# Setup a non-privileged user
|
# Setup a non-privileged user
|
||||||
ARG USER_ID
|
ARG USER_ID
|
||||||
|
|
||||||
|
|
12
start.sh
12
start.sh
|
@ -1,10 +1,16 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Set PS1 so we know we're in the container, should we exec into it.
|
trap '
|
||||||
|
echo "Caught signal, shutting down."
|
||||||
|
exit 0
|
||||||
|
' SIGTERM SIGINT
|
||||||
|
|
||||||
|
# Set PS1 so we know we're in the container
|
||||||
cat > .bashrc <<EOF
|
cat > .bashrc <<EOF
|
||||||
alias ls='ls --color'
|
alias ls='ls --color'
|
||||||
export PS1='\[\e]0;\u@\h: \w\a\]\${debian_chroot:+(\$debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;33m\]\$(parse_git_branch)\[\033[00m\]\$ '"
|
export PS1='\[\033[01;35m\]\u@dayzdockerserver\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;33m\]\\[\033[00m\]\$ '
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Block the container from exiting
|
# Block the container from exiting
|
||||||
exec tail -f /dev/null
|
tail -f /dev/null &
|
||||||
|
wait $!
|
Loading…
Add table
Reference in a new issue