Skip to content

Commit ab3f4ad

Browse files
committed
fxx
1 parent 3a10ce5 commit ab3f4ad

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Dockerfile

+8-4
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,11 @@ RUN service cron start
183183
EXPOSE 3000 5173
184184

185185
# CMD that fetches and runs the entrypoint script
186-
CMD dbus-daemon --system --fork && sh -c 'echo "Fetching latest container entrypoint script..." && \
187-
gsutil cp "gs://${AGENTS_BUCKET_NAME}/_project-files/container-entrypoint.sh" /app/container-entrypoint.sh && \
188-
chmod +x /app/container-entrypoint.sh && \
189-
/app/container-entrypoint.sh'
186+
CMD sh -c 'if [ ! -f /run/dbus/pid ] || ! ps -p $(cat /run/dbus/pid) > /dev/null; then \
187+
rm -f /run/dbus/pid; \
188+
dbus-daemon --system --fork; \
189+
fi && \
190+
echo "Fetching latest container entrypoint script..." && \
191+
gsutil cp "gs://${AGENTS_BUCKET_NAME}/_project-files/container-entrypoint.sh" /app/container-entrypoint.sh && \
192+
chmod +x /app/container-entrypoint.sh && \
193+
/app/container-entrypoint.sh'

0 commit comments

Comments
 (0)