fix: copy .bashrc in entrypoint instead of bind mount to avoid directory error
This commit is contained in:
parent
c80a61a115
commit
7ae8a5013e
|
|
@ -6,9 +6,8 @@ services:
|
||||||
network_mode: host
|
network_mode: host
|
||||||
volumes:
|
volumes:
|
||||||
# Personalização do Shell e Scripts
|
# Personalização do Shell e Scripts
|
||||||
- ./.bashrc:/root/.bashrc:ro
|
# Montado em /opt para ser distribuído pelo entrypoint (evita erro de montagem como diretório)
|
||||||
- ./.bashrc:/home/itguys/.bashrc:ro
|
- ./.bashrc:/opt/custom_bashrc:ro
|
||||||
- ./.bashrc:/etc/bash.bashrc:ro
|
|
||||||
|
|
||||||
# Volumes para Configurações (Persistência Interna)
|
# Volumes para Configurações (Persistência Interna)
|
||||||
# Um único volume para o diretório de configs do Nginx (preserva nginx.conf, conf.d e snippets)
|
# Um único volume para o diretório de configs do Nginx (preserva nginx.conf, conf.d e snippets)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,14 @@
|
||||||
# Carrega o .bashrc se existir
|
# Carrega o .bashrc se existir
|
||||||
[ -f ~/.bashrc ] && . ~/.bashrc
|
[ -f ~/.bashrc ] && . ~/.bashrc
|
||||||
|
|
||||||
|
# Distribui o .bashrc customizado se montado
|
||||||
|
if [ -f /opt/custom_bashrc ]; then
|
||||||
|
echo "📄 Aplicando .bashrc customizado..."
|
||||||
|
cat /opt/custom_bashrc > /root/.bashrc
|
||||||
|
cat /opt/custom_bashrc > /home/itguys/.bashrc
|
||||||
|
chown itguys:itguys /home/itguys/.bashrc
|
||||||
|
fi
|
||||||
|
|
||||||
# Gera chaves de host SSH se não existirem
|
# Gera chaves de host SSH se não existirem
|
||||||
ssh-keygen -A
|
ssh-keygen -A
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue