Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build-and-push-docker-images
on:
workflow_dispatch:
push:
branches: ["master"]
tags: ['*']

jobs:
build-and-push:
Expand All @@ -29,4 +29,4 @@ jobs:
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4
with:
push: true
tags: ghcr.io/tryriot/smokescreen:latest
tags: ghcr.io/tryriot/smokescreen:${{ github.ref_name }},ghcr.io/tryriot/smokescreen:latest
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,18 @@ ENV DD_HOSTNAME=smokescreen-container

RUN echo '#!/bin/bash' > /start.sh && \
echo 'export DD_HOSTNAME=${DD_HOSTNAME:-$(hostname)}' >> /start.sh && \
echo '/opt/datadog-agent/bin/agent/agent run > /dev/null 2>&1 &' >> /start.sh && \
echo 'mkdir -p /etc/datadog-agent/conf.d/smokescreen.d' >> /start.sh && \
echo 'cat > /etc/datadog-agent/conf.d/smokescreen.d/conf.yaml << EOF' >> /start.sh && \
echo 'logs:' >> /start.sh && \
echo ' - type: file' >> /start.sh && \
echo ' path: "/var/log/smokescreen/smokescreen.log"' >> /start.sh && \
echo ' service: "smokescreen"' >> /start.sh && \
echo ' source: "go"' >> /start.sh && \
echo 'EOF' >> /start.sh && \
echo '/opt/datadog-agent/bin/agent/agent run &' >> /start.sh && \
echo 'sleep 2' >> /start.sh && \
echo 'exec ./smokescreen --statsd-address localhost:8125 ' >> /start.sh && \
echo 'mkdir -p /var/log/smokescreen' >> /start.sh && \
echo 'exec ./smokescreen --statsd-address localhost:8125 >> /var/log/smokescreen/smokescreen.log 2>&1' >> /start.sh && \
chmod +x /start.sh

CMD ["/start.sh"]
Expand Down