feat: overhaul container initialization and entrypoint

- Replace apt-get with apt in Dockerfile
- Add tini as init system and set ENTRYPOINT/CMD
- Simplify init.fish by removing first-run logic and tmux session management
- Add landing.fish and SIGTERM signal handling
- Improve container lifecycle management
This commit is contained in:
iceBear67
2025-09-25 17:20:58 +08:00
parent b3e32f11bc
commit ad1ea04549
3 changed files with 43 additions and 42 deletions
+6 -3
View File
@@ -5,14 +5,17 @@ RUN git clone https://github.com/iceBear67/bubble .
FROM debian:13
COPY --from=0 --chmod=0755 /src/bubble.sh /bin/bubble
RUN <<EOF
apt-get update && apt-get upgrade
apt update
apt upgrade
chmod +x /bin/bubble
apt-get install -y curl jq neovim htop fish tmux sudo git iproute2 iputils-ping dnsutils openssh-sftp-server build-essential htop
apt install curl jq neovim htop fish tmux sudo git iproute2 iputils-ping dnsutils openssh-sftp-server build-essential htop tini
useradd -m -s /usr/bin/fish user
echo "user ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers
sudo -u user mkdir -p /home/user/.config/fish/
ln -s /usr/lib/openssh/sftp-server /usr/sbin/bubble-sftp
EOF
COPY ./init.fish /init.fish
COPY ./landing.fish /landing.fish
COPY --chown=user ./user.fish /home/user/.config/fish/config.fish
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/usr/bin/fish", "/init.fish"]