Skip to content

Commit 104c6e5

Browse files
committed
DockerHub configuration
1 parent e45ef07 commit 104c6e5

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

Dockerfile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,26 @@
22
# Base image
33
FROM lsiobase/alpine.python3:latest
44

5+
# Build arguments
6+
ARG BUILD_DATE
7+
ARG VCS_REF
8+
ARG VCS_SRC
9+
ARG VERSION
10+
511
#
612
# Image labels
713
# @see https://github.com/opencontainers/image-spec/blob/master/annotations.md
814
# @see https://semver.org/
915
#
10-
LABEL org.opencontainers.image.title = "OpenVPN Server" \
11-
org.opencontainers.image.description = "Docker image with OpenVPN server" \
12-
org.opencontainers.image.url = "https://github.com/SloCompTech/docker-openvpn" \
13-
org.opencontainers.image.authors = "Martin Dagarin <>" \
14-
org.opencontainers.image.version = "0.0.2"
16+
LABEL org.opencontainers.image.title="OpenVPN Server" \
17+
org.opencontainers.image.description="Docker image with OpenVPN server" \
18+
org.opencontainers.image.url="https://github.com/SloCompTech/docker-openvpn" \
19+
org.opencontainers.image.authors="Martin Dagarin <martin.dagarin@gmail.com>" \
20+
org.opencontainers.image.version=$VERSION \
21+
org.opencontainers.image.revision=$VCS_REF \
22+
org.opencontainers.image.source=$VCS_SRC \
23+
org.opencontainers.image.created=$BUILD_DATE
24+
1525

1626
#
1727
# Environment variables

hooks/build

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
#
4+
# DockerHub build hook (overrides default build command)
5+
#
6+
7+
echo "Building image"
8+
9+
docker build \
10+
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
11+
--build-arg VCS_REF=$SOURCE_COMMIT \
12+
--build-arg VCS_SRC="https://github.com/SloCompTech/docker-openvpn/commit/$SOURCE_COMMIT"
13+
-f $DOCKERFILE_PATH \
14+
-t $IMAGE_NAME .

0 commit comments

Comments
 (0)