Skip to content

Commit 6b63869

Browse files
committed
Add org.opencontainers.image.* labels
Licence: https://github.com/phpmyadmin/phpmyadmin/blob/master/composer.json
1 parent a4071cd commit 6b63869

File tree

7 files changed

+85
-4
lines changed

7 files changed

+85
-4
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ _helpers:
2929
stage: "Run tests in testing container"
3030
script:
3131
# Build image
32-
- docker build -t phpmyadmin/phpmyadmin apache
32+
- docker build --build-arg VCS_REF=`git rev-parse HEAD` --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -t phpmyadmin/phpmyadmin apache
3333
# Test for single database
3434
- docker run --name testadmin -d --link db_server:db -p 9090:80 phpmyadmin/phpmyadmin
3535
- ./testing/test-docker.sh testadmin 9090
@@ -71,17 +71,17 @@ jobs:
7171
name: "Apache amd64"
7272
arch: amd64
7373
script:
74-
- docker build -t phpmyadmin/phpmyadmin apache
74+
- docker build --build-arg VCS_REF=`git rev-parse HEAD` --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -t phpmyadmin/phpmyadmin apache
7575
- <<: *build-image
7676
name: "fpm amd64"
7777
arch: amd64
7878
script:
79-
- docker build -t phpmyadmin/phpmyadmin fpm
79+
- docker build --build-arg VCS_REF=`git rev-parse HEAD` --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -t phpmyadmin/phpmyadmin fpm
8080
- <<: *build-image
8181
name: "fpm-alpine amd64"
8282
arch: amd64
8383
script:
84-
- docker build -t phpmyadmin/phpmyadmin fpm-alpine
84+
- docker build --build-arg VCS_REF=`git rev-parse HEAD` --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -t phpmyadmin/phpmyadmin fpm-alpine
8585
- <<: *test-apache-image
8686
name: "Run testing for MariaDB"
8787
env: DB=mariadb:latest

Dockerfile-alpine.template

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,21 @@ RUN set -ex; \
6161
# Calculate download URL
6262
ENV VERSION %%VERSION%%
6363
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
64+
ARG BUILD_DATE
65+
ARG VCS_REF
66+
67+
LABEL maintainer="The phpMyAdmin Team <developers@phpmyadmin.net>" \
68+
org.opencontainers.image.title="Official phpMyAdmin Docker image" \
69+
org.opencontainers.image.description="Run phpMyAdmin with Alpine, Apache and PHP FPM." \
70+
org.opencontainers.image.authors="The phpMyAdmin Team <developers@phpmyadmin.net>" \
71+
org.opencontainers.image.vendor="phpMyAdmin" \
72+
org.opencontainers.image.documentation="https://github.com/phpmyadmin/docker#readme" \
73+
org.opencontainers.image.licenses="GPL-2.0-only" \
74+
org.opencontainers.image.version="${VERSION}" \
75+
org.opencontainers.image.url="https://github.com/phpmyadmin/docker#readme" \
76+
org.opencontainers.image.source="https://github.com/phpmyadmin/docker.git" \
77+
org.opencontainers.image.revision="${VCS_REF}" \
78+
org.opencontainers.image.created="${BUILD_DATE}"
6479

6580
# Download tarball, verify it using gpg and extract
6681
RUN set -ex; \

Dockerfile-debian.template

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@ RUN set -ex; \
6464
# Calculate download URL
6565
ENV VERSION %%VERSION%%
6666
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
67+
ARG BUILD_DATE
68+
ARG VCS_REF
69+
70+
LABEL maintainer="The phpMyAdmin Team <developers@phpmyadmin.net>" \
71+
org.opencontainers.image.title="Official phpMyAdmin Docker image" \
72+
org.opencontainers.image.description="Run phpMyAdmin with Alpine, Apache and PHP FPM." \
73+
org.opencontainers.image.authors="The phpMyAdmin Team <developers@phpmyadmin.net>" \
74+
org.opencontainers.image.vendor="phpMyAdmin" \
75+
org.opencontainers.image.documentation="https://github.com/phpmyadmin/docker#readme" \
76+
org.opencontainers.image.licenses="GPL-2.0-only" \
77+
org.opencontainers.image.version="${VERSION}" \
78+
org.opencontainers.image.url="https://github.com/phpmyadmin/docker#readme" \
79+
org.opencontainers.image.source="https://github.com/phpmyadmin/docker.git" \
80+
org.opencontainers.image.revision="${VCS_REF}" \
81+
org.opencontainers.image.created="${BUILD_DATE}"
6782

6883
# Download tarball, verify it using gpg and extract
6984
RUN set -ex; \

apache/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@ RUN set -ex; \
6464
# Calculate download URL
6565
ENV VERSION 5.0.1
6666
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
67+
ARG BUILD_DATE
68+
ARG VCS_REF
69+
70+
LABEL maintainer="The phpMyAdmin Team <developers@phpmyadmin.net>" \
71+
org.opencontainers.image.title="Official phpMyAdmin Docker image" \
72+
org.opencontainers.image.description="Run phpMyAdmin with Alpine, Apache and PHP FPM." \
73+
org.opencontainers.image.authors="The phpMyAdmin Team <developers@phpmyadmin.net>" \
74+
org.opencontainers.image.vendor="phpMyAdmin" \
75+
org.opencontainers.image.documentation="https://github.com/phpmyadmin/docker#readme" \
76+
org.opencontainers.image.licenses="GPL-2.0-only" \
77+
org.opencontainers.image.version="${VERSION}" \
78+
org.opencontainers.image.url="https://github.com/phpmyadmin/docker#readme" \
79+
org.opencontainers.image.source="https://github.com/phpmyadmin/docker.git" \
80+
org.opencontainers.image.revision="${VCS_REF}" \
81+
org.opencontainers.image.created="${BUILD_DATE}"
6782

6883
# Download tarball, verify it using gpg and extract
6984
RUN set -ex; \

fpm-alpine/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,21 @@ RUN set -ex; \
6161
# Calculate download URL
6262
ENV VERSION 5.0.1
6363
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
64+
ARG BUILD_DATE
65+
ARG VCS_REF
66+
67+
LABEL maintainer="The phpMyAdmin Team <developers@phpmyadmin.net>" \
68+
org.opencontainers.image.title="Official phpMyAdmin Docker image" \
69+
org.opencontainers.image.description="Run phpMyAdmin with Alpine, Apache and PHP FPM." \
70+
org.opencontainers.image.authors="The phpMyAdmin Team <developers@phpmyadmin.net>" \
71+
org.opencontainers.image.vendor="phpMyAdmin" \
72+
org.opencontainers.image.documentation="https://github.com/phpmyadmin/docker#readme" \
73+
org.opencontainers.image.licenses="GPL-2.0-only" \
74+
org.opencontainers.image.version="${VERSION}" \
75+
org.opencontainers.image.url="https://github.com/phpmyadmin/docker#readme" \
76+
org.opencontainers.image.source="https://github.com/phpmyadmin/docker.git" \
77+
org.opencontainers.image.revision="${VCS_REF}" \
78+
org.opencontainers.image.created="${BUILD_DATE}"
6479

6580
# Download tarball, verify it using gpg and extract
6681
RUN set -ex; \

fpm/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@ RUN set -ex; \
6464
# Calculate download URL
6565
ENV VERSION 5.0.1
6666
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
67+
ARG BUILD_DATE
68+
ARG VCS_REF
69+
70+
LABEL maintainer="The phpMyAdmin Team <developers@phpmyadmin.net>" \
71+
org.opencontainers.image.title="Official phpMyAdmin Docker image" \
72+
org.opencontainers.image.description="Run phpMyAdmin with Alpine, Apache and PHP FPM." \
73+
org.opencontainers.image.authors="The phpMyAdmin Team <developers@phpmyadmin.net>" \
74+
org.opencontainers.image.vendor="phpMyAdmin" \
75+
org.opencontainers.image.documentation="https://github.com/phpmyadmin/docker#readme" \
76+
org.opencontainers.image.licenses="GPL-2.0-only" \
77+
org.opencontainers.image.version="${VERSION}" \
78+
org.opencontainers.image.url="https://github.com/phpmyadmin/docker#readme" \
79+
org.opencontainers.image.source="https://github.com/phpmyadmin/docker.git" \
80+
org.opencontainers.image.revision="${VCS_REF}" \
81+
org.opencontainers.image.created="${BUILD_DATE}"
6782

6883
# Download tarball, verify it using gpg and extract
6984
RUN set -ex; \

hooks/build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
# This file is used by docker hub to build the image
3+
4+
docker build --build-arg VCS_REF=`git rev-parse HEAD` \
5+
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
6+
-t $IMAGE_NAME .

0 commit comments

Comments
 (0)