Skip to content

Commit

Permalink
Merge pull request #8 from chentex/test-dockerhub-hooks
Browse files Browse the repository at this point in the history
Activate docker hub hooks.
  • Loading branch information
chentex authored Aug 14, 2020
2 parents 9afe8cb + c8c7d01 commit 0e0d963
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
FROM alpine:3.8
FROM alpine:3.12
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/chentex/random-logger" \
org.label-schema.version=$VERSION
RUN apk add --no-cache bc
COPY ./entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Vicente Zepeda
Copyright (c) 2020 Vicente Zepeda

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions hooks/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
9 changes: 9 additions & 0 deletions hooks/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

export VERSION=$(cat hooks/VERSION)
export IMAGE_NAME="chentex/random-logger"

docker build --build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` \
--build-arg VERSION=$VERSION \
-f Dockerfile -t $IMAGE_NAME:v$VERSION -t $IMAGE_NAME:latest .

0 comments on commit 0e0d963

Please sign in to comment.