Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions opensciencegrid/frontier-squid/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ RUN rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch && \
yum install -y filebeat && \
rm -rf /var/cache/yum/*

# Use a modified supervisord startup script that removes the cleanup
# program from the supervisord config so `supervisorctl status`
# doesn't exit nonzero.
# TODO: Remove when https://github.com/opensciencegrid/docker-software-base/pull/105 is merged.
COPY supervisord_startup.sh /usr/local/sbin/supervisord_startup.sh

COPY start-frontier-squid.sh /usr/sbin/
COPY squid-customize.sh /etc/squid/customize.sh
COPY customize.d/* /etc/squid/customize.d/
Expand Down
18 changes: 18 additions & 0 deletions opensciencegrid/frontier-squid/supervisord_startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Allow the derived images to run any additional runtime customizations
shopt -s nullglob
for x in /etc/osg/image-init.d/*.sh; do source "$x"; done
shopt -u nullglob

chmod go-w /etc/cron.*/* 2>/dev/null || :

if [[ -z $(shopt -s nullglob && echo /etc/osg/image-cleanup.d/*.sh) ]]; then
rm -f /etc/supervisord.d/00-cleanup.conf
fi


# Now we can actually start the supervisor
# Use whatever user id this container as run as
exec /usr/bin/supervisord -c /etc/supervisord.conf -u $(id -u)

Loading