diff --git a/Dockerfile b/Dockerfile index 10d2a46..7a63654 100644 --- a/Dockerfile +++ b/Dockerfile @@ -90,7 +90,7 @@ RUN set -eux \ # Install eccodes # requires ecbuild -ARG ECCODES_VERSION=2.17.1 +ARG ECCODES_VERSION=2.18.0 RUN set -eux \ && mkdir -p /src/ \ && cd /src \ @@ -107,11 +107,13 @@ RUN set -eux \ # Install ecCodes # requires ecBuild # Install Python run-time dependencies (for eccodes) +ARG PYTHON_ECCODES_VERSION=0.9.8 RUN set -ex \ && mkdir -p /src/ \ && cd /src/ \ && git clone https://github.com/ecmwf/eccodes-python \ && cd eccodes-python \ + && git checkout ${PYTHON_ECCODES_VERSION} \ && pip install -e . \ && python builder.py @@ -176,4 +178,4 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.vcs-url=$VCS_URL \ org.label-schema.vendor="DWD - Deutscher Wetterdienst" \ org.label-schema.version=$VERSION \ - org.label-schema.schema-version="1.0" \ No newline at end of file + org.label-schema.schema-version="1.0" diff --git a/Makefile b/Makefile index 6e23e32..3d1ee6a 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +SHELL := /bin/bash + # test TEST_CMD := python -m eccodes selfcheck @@ -10,7 +12,7 @@ SOURCE_TAG := ${shell . ./hooks/env && echo $$SOURCE_TAG} DOCKER_TAG := ${shell . ./hooks/env && echo $$DOCKER_TAG} IMAGE_NAME := ${shell . ./hooks/env && echo $$IMAGE_NAME} -aall: build +all: build .PHONY: build run run-interactive test login login-user-pass push clean @@ -36,4 +38,4 @@ push: ./hooks/post_push clean: - @docker rmi ${DOCKER_REPO} \ No newline at end of file + @docker rmi ${DOCKER_REPO} diff --git a/README.md b/README.md index 4b49d2a..4345aed 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Python and [ECMWF ecCodes](https://github.com/ecmwf/eccodes) packaged in a Docker container to allow for easy processing of GRIB2 and BUFR files. [![Python Version](https://img.shields.io/badge/python-3.7.7-informational)](https://hub.docker.com/_/python) -[![ecCodes Version](https://img.shields.io/badge/ecCodes-2.17.1-informational)](https://github.com/ecmwf/eccodes) -[![ecCodes- Version](https://img.shields.io/static/v1?label=eccodes-python&message=latest&color=informational)](https://github.com/ecmwf/eccodes-python) +[![ecCodes Version](https://img.shields.io/badge/ecCodes-2.18.0-informational)](https://github.com/ecmwf/eccodes) +[![ecCodes-Python Version](https://img.shields.io/static/v1?label=eccodes-python&message=0.9.8&color=informational)](https://github.com/ecmwf/eccodes-python) [![Docker Build Status](https://img.shields.io/docker/cloud/build/deutscherwetterdienst/python-eccodes.svg)](https://hub.docker.com/r/deutscherwetterdienst/python-eccodes) [![Docker Pulls](https://img.shields.io/docker/pulls/deutscherwetterdienst/python-eccodes)](https://hub.docker.com/r/deutscherwetterdienst/python-eccodes) @@ -39,4 +39,4 @@ edition centre date dataType gridType stepRange ty 1 of 1 messages in some-file.grib2 1 of 1 total messages in 1 files -``` \ No newline at end of file +``` diff --git a/hooks/build b/hooks/build index 6f0583f..053080f 100755 --- a/hooks/build +++ b/hooks/build @@ -24,6 +24,7 @@ docker build \ --build-arg ECBUILD_VERSION=${ECBUILD_VERSION} \ --build-arg ECCODES_VERSION=${ECCODES_VERSION} \ + --build-arg PYTHON_ECCODES_VERSION=${PYTHON_ECCODES_VERSION} \ --build-arg PYTHON_VERSION=${PYTHON_VERSION} \ --build-arg BUILD_DATE=${DATE} \ --build-arg VCS_URL=${SOURCE_URL} \ diff --git a/hooks/env b/hooks/env index a0b12a2..00db579 100755 --- a/hooks/env +++ b/hooks/env @@ -6,7 +6,8 @@ [ -n "$SOURCE_URL" ] || SOURCE_URL=https://github.com/deutscherwetterdienst/python-eccodes [ -n "$DOCKER_REPO" ] || DOCKER_REPO=deutscherwetterdienst/python-eccodes [ -n "$ECBUILD_VERSION" ] || ECBUILD_VERSION="3.3.2" -[ -n "$ECCODES_VERSION" ] || ECCODES_VERSION="2.17.1" +[ -n "$ECCODES_VERSION" ] || ECCODES_VERSION="2.18.0" +[ -n "$PYTHON_ECCODES_VERSION" ] || PYTHON_ECCODES_VERSION="0.9.8" [ -n "$PYTHON_VERSION" ] || PYTHON_VERSION="3.7.7" [ -n "$SOURCE_BRANCH" ] || SOURCE_BRANCH=$(git symbolic-ref -q --short HEAD) @@ -33,4 +34,4 @@ fi [ -n "$IMAGE_NAME_LATEST" ] || IMAGE_NAME_LATEST=${DOCKER_REPO}:latest [ -n "$IMAGE_NAME_LONG" ] || IMAGE_NAME_LONG=${DOCKER_REPO}:${PYTHON_VERSION}-${ECCODES_VERSION}-${DOCKER_TAG} [ -n "$IMAGE_NAME_LONG_LATEST" ] || IMAGE_NAME_LONG_LATEST=${DOCKER_REPO}:${PYTHON_VERSION}-${ECCODES_VERSION}-latest -[ -n "$DATE" ] || DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ) \ No newline at end of file +[ -n "$DATE" ] || DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)