-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: switch to opencontainers LABELs for the Dockerfile
label-schema is deprecated in favour of OCI. It also specifies a bit more keys, making it a bit easier for some automated systems to do their job correctly. While at it, make Dockerfile over repositories more the same.
- Loading branch information
Showing
1 changed file
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,17 +3,21 @@ FROM python:3.8-slim | |
ARG BUILD_DATE="" | ||
ARG BUILD_VERSION="dev" | ||
|
||
LABEL maintainer="[email protected]" | ||
LABEL org.label-schema.schema-version="1.0" | ||
LABEL org.label-schema.build-date=${BUILD_DATE} | ||
LABEL org.label-schema.version=${BUILD_VERSION} | ||
LABEL maintainer="OpenTTD Dev Team <[email protected]>" | ||
LABEL org.opencontainers.image.created=${BUILD_DATE} | ||
LABEL org.opencontainers.image.authors="OpenTTD Dev Team <[email protected]>" | ||
LABEL org.opencontainers.image.url="https://github.com/OpenTTD/master-server-web" | ||
LABEL org.opencontainers.image.source="https://github.com/OpenTTD/master-server-web" | ||
LABEL org.opencontainers.image.version=${BUILD_VERSION} | ||
LABEL org.opencontainers.image.licenses="GPLv2" | ||
LABEL org.opencontainers.image.title="Web frontend for the Master Server Public Server Listing" | ||
LABEL org.opencontainers.image.description="This is a front-end for the Master Server Public Server listing." | ||
|
||
WORKDIR /code | ||
|
||
COPY requirements.txt \ | ||
LICENSE \ | ||
README.md \ | ||
.version \ | ||
/code/ | ||
# Needed for Sentry to know what version we are running | ||
RUN echo "${BUILD_VERSION}" > /code/.version | ||
|
@@ -22,9 +26,9 @@ RUN pip --no-cache-dir install -r requirements.txt | |
|
||
# Validate that what was installed was what was expected | ||
RUN pip freeze 2>/dev/null > requirements.installed \ | ||
&& diff -u --strip-trailing-cr requirements.txt requirements.installed 1>&2 \ | ||
|| ( echo "!! ERROR !! requirements.txt defined different packages or versions for installation" \ | ||
&& exit 1 ) 1>&2 | ||
&& diff -u --strip-trailing-cr requirements.txt requirements.installed 1>&2 \ | ||
|| ( echo "!! ERROR !! requirements.txt defined different packages or versions for installation" \ | ||
&& exit 1 ) 1>&2 | ||
|
||
COPY webclient /code/webclient | ||
|
||
|