Skip to content

Commit 0e0d963

Browse files
authored
Merge pull request #8 from chentex/test-dockerhub-hooks
Activate docker hub hooks.
2 parents 9afe8cb + c8c7d01 commit 0e0d963

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

Dockerfile

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
FROM alpine:3.8
1+
FROM alpine:3.12
2+
ARG BUILD_DATE
3+
ARG VCS_REF
4+
ARG VERSION
5+
LABEL org.label-schema.build-date=$BUILD_DATE \
6+
org.label-schema.vcs-ref=$VCS_REF \
7+
org.label-schema.vcs-url="https://github.com/chentex/random-logger" \
8+
org.label-schema.version=$VERSION
29
RUN apk add --no-cache bc
310
COPY ./entrypoint.sh /
411
ENTRYPOINT ["/entrypoint.sh"]

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Vicente Zepeda
3+
Copyright (c) 2020 Vicente Zepeda
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

hooks/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.0

hooks/build

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
export VERSION=$(cat hooks/VERSION)
4+
export IMAGE_NAME="chentex/random-logger"
5+
6+
docker build --build-arg VCS_REF=`git rev-parse --short HEAD` \
7+
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` \
8+
--build-arg VERSION=$VERSION \
9+
-f Dockerfile -t $IMAGE_NAME:v$VERSION -t $IMAGE_NAME:latest .

0 commit comments

Comments
 (0)