Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to opencontainers annotation for docker images #1381

Merged
merged 6 commits into from
Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,11 @@ def dockerReleases(ctx):
return pipelines

def dockerRelease(ctx, arch):
build_args = [
'REVISION=%s' % (ctx.build.commit),
'VERSION=%s' % (ctx.build.ref.replace("refs/tags/", "") if ctx.build.event == "tag" else "latest")
]

return {
'kind': 'pipeline',
'type': 'docker',
Expand All @@ -716,6 +721,7 @@ def dockerRelease(ctx, arch):
'tags': 'linux-%s' % (arch),
'dockerfile': 'ocis/docker/Dockerfile.linux.%s' % (arch),
'repo': ctx.repo.slug,
'build_args': build_args,
},
'when': {
'ref': {
Expand All @@ -740,7 +746,8 @@ def dockerRelease(ctx, arch):
'context': 'ocis',
'auto_tag_suffix': 'linux-%s' % (arch),
'dockerfile': 'ocis/docker/Dockerfile.linux.%s' % (arch),
'repo': ctx.repo.slug,
'repo': ctx.build.commit,
'build_args': build_args,
},
'when': {
'ref': {
Expand Down
5 changes: 5 additions & 0 deletions changelog/unreleased/opencontainers-labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Switch to opencontainers annotation scheme

Switch docker image annotation scheme to org.opencontainers standard because org.label-schema is depreciated.

https://github.com/owncloud/ocis/pull/1381
16 changes: 13 additions & 3 deletions ocis/docker/Dockerfile.linux.amd64
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
FROM amd64/alpine:3.12

ARG VERSION=""
ARG REVISION=""

RUN apk update && \
apk upgrade && \
apk add ca-certificates mailcap && \
rm -rf /var/cache/apk/* && \
echo 'hosts: files dns' >| /etc/nsswitch.conf

LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="ownCloud Infinite Scale" \
org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0"
org.opencontainers.image.title="ownCloud Infinite Scale" \
org.opencontainers.image.vendor="ownCloud GmbH" \
org.opencontainers.image.authors="ownCloud GmbH" \
org.opencontainers.image.description="oCIS - ownCloud Infinite Scale is a modern file-sync and share platform" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.documentation="https://github.com/owncloud/ocis" \
org.opencontainers.image.url="https://hub.docker.com/r/owncloud/ocis" \
org.opencontainers.image.source="https://github.com/owncloud/ocis" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.revision="${REVISION}"

EXPOSE 9200/tcp

Expand Down
16 changes: 13 additions & 3 deletions ocis/docker/Dockerfile.linux.arm
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
FROM arm32v6/alpine:3.12

ARG VERSION=""
ARG REVISION=""

RUN apk update && \
apk upgrade && \
apk add ca-certificates mailcap && \
rm -rf /var/cache/apk/* && \
echo 'hosts: files dns' >| /etc/nsswitch.conf

LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="ownCloud Infinite Scale" \
org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0"
org.opencontainers.image.title="ownCloud Infinite Scale" \
org.opencontainers.image.vendor="ownCloud GmbH" \
org.opencontainers.image.authors="ownCloud GmbH" \
org.opencontainers.image.description="oCIS - ownCloud Infinite Scale is a modern file-sync and share platform" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.documentation="https://github.com/owncloud/ocis" \
org.opencontainers.image.url="https://hub.docker.com/r/owncloud/ocis" \
org.opencontainers.image.source="https://github.com/owncloud/ocis" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.revision="${REVISION}"

EXPOSE 9200/tcp

Expand Down
16 changes: 13 additions & 3 deletions ocis/docker/Dockerfile.linux.arm64
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
FROM arm64v8/alpine:3.12

ARG VERSION=""
ARG REVISION=""

RUN apk update && \
apk upgrade && \
apk add ca-certificates mailcap && \
rm -rf /var/cache/apk/* && \
echo 'hosts: files dns' >| /etc/nsswitch.conf

LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="ownCloud Infinite Scale" \
org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0"
org.opencontainers.image.title="ownCloud Infinite Scale" \
org.opencontainers.image.vendor="ownCloud GmbH" \
org.opencontainers.image.authors="ownCloud GmbH" \
org.opencontainers.image.description="oCIS - ownCloud Infinite Scale is a modern file-sync and share platform" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.documentation="https://github.com/owncloud/ocis" \
org.opencontainers.image.url="https://hub.docker.com/r/owncloud/ocis" \
org.opencontainers.image.source="https://github.com/owncloud/ocis" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.revision="${REVISION}"

EXPOSE 9200/tcp

Expand Down