Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Open
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
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ RUN apk add --no-cache \
bind-tools \
;

RUN apk add python curl
RUN curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
RUN unzip awscli-bundle.zip
RUN ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

ENV RSYSLOG=y

COPY render_cfg.sh /
Expand Down
4 changes: 2 additions & 2 deletions render_cfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ else

# Resolve DNS
for _service in ${service//,/ }; do
dig $_service 2>/dev/null | grep ^$_service | awk '{print $5}'
done | sort | paste -sd ',' > $tmpfile
aws servicediscovery list-instances --service-id $_service --query 'Instances[].Attributes.AWS_INSTANCE_IPV4' --output text --region eu-west-1
done | tr '\t' '\n' | sort | paste -sd ',' > $tmpfile
if [ $(wc -c $tmpfile | gawk '{print $1}') -eq 0 ]; then
rm $tmpfile
echo "Unable to resolve addresses for $service "
Expand Down