Skip to content

Commit

Permalink
Add versioning to Docker, so we can trace back every component
Browse files Browse the repository at this point in the history
  • Loading branch information
wdoekes committed Nov 11, 2022
1 parent 9431ee1 commit 2f78e74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ LABEL dockerfile-vcs="https://github.com/ossobv/alert-group-nl-log2slack"
ENV PYTHONUNBUFFERED=1
RUN pip install BeautifulSoup4 requests phpserialize
COPY alert_group_nl_log2slack.py /srv/
ARG GITVERSION
RUN echo "$GITVERSION (built $(date +%Y-%m-%d))" >/srv/version
CMD python3 -V && pip freeze && echo '.' && \
echo 'Starting publish-forever...' && \
echo 'Starting publish-forever...' $(cat /srv/version) && \
ln -sf /usr/share/zoneinfo/${TIMEZONE:-Etc/UTC} /etc/localtime && \
test -s /etc/localtime && \
exec python3 /srv/alert_group_nl_log2slack.py publish
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ Requirements::
KLANT_CODE = <pass>
SLACK_WEBHOOK_URL = https://hooks.slack.com/services/T../B../a..
TIMEZONE = Europe/Amsterdam # used by Docker image

Building::

docker build --build-arg=GITVERSION=$(git describe --always) \
-t $NAMESPACE/alert-group-nl-log2slack .

0 comments on commit 2f78e74

Please sign in to comment.