Skip to content

Commit fb1ed2d

Browse files
Add SSH agent setup for persistent Git operations in Dockerfile and entrypoint script
1 parent 7eac1ad commit fb1ed2d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,10 @@ EXPOSE 8069
8181

8282
# Odoo version
8383
LABEL version="8.0.1.0"
84+
85+
# Add SSH agent setup for persistent Git operations
86+
RUN apt-get update && apt-get install -y --no-install-recommends openssh-client \
87+
&& mkdir -p /root/.ssh && chmod 0700 /root/.ssh
88+
89+
# Ensure SSH agent is started
90+
RUN echo 'eval $(ssh-agent -s)' >> /root/.bashrc

entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@ until pg_isready -h "$HOST" -U "$USER"; do
77
sleep 2
88
done
99

10+
# Start SSH agent and add keys
11+
if [ -f /root/.ssh/id_ed25519 ]; then
12+
eval $(ssh-agent -s)
13+
ssh-add /root/.ssh/id_ed25519
14+
fi
15+
1016
# Start Odoo
1117
exec "$@"

0 commit comments

Comments
 (0)