Skip to content

Commit

Permalink
Docker update (#143)
Browse files Browse the repository at this point in the history
* Bump version number

* Back to dev

* update release version v0.8.3

* Dockerfile updated to use wmo-im/dim eccodes base image.

* (re)addition of APL to dockerfile
Use latest release of csv2bufr templates
  • Loading branch information
david-i-berry authored Jan 6, 2025
1 parent c5e7d7f commit 656344e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
35 changes: 13 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,21 @@
# under the License.
#
###############################################################################
FROM wmoim/dim_eccodes_baseimage:jammy-2.36.0

#FROM ubuntu:latest
FROM wmoim/dim_eccodes_baseimage:2.28.0

ENV DEBIAN_FRONTEND="noninteractive" \
TZ="Etc/UTC" \
ECCODES_DIR=/opt/eccodes \
PATH="${PATH}:/opt/eccodes/bin" \
BUFR_ORIGINATING_CENTRE=65535 \
BUFR_ORIGINATING_SUBCENTRE=65535

RUN apt-get update -y \
&& apt-get install -y vim emacs nedit nano git wget

# install csv2bufr templates
RUN mkdir /opt/csv2bufr && \
cd /opt/csv2bufr && \
wget https://github.com/wmo-im/csv2bufr-templates/archive/refs/tags/v0.1.tar.gz && \
tar -zxf v0.1.tar.gz --strip-components=1 csv2bufr-templates-0.1/templates
# update image
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y wget git

# install csv2bufr
WORKDIR /tmp

COPY . /tmp/csv2bufr
RUN cd /tmp/csv2bufr && python3 setup.py install && cd /tmp && rm -R csv2bufr

RUN cd /tmp/csv2bufr && python3 setup.py install


# get latest version of csv2bufr templates and install
RUN export c2bt=`git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/wmo-im/csv2bufr-templates.git | tail -1 | cut -d '/' -f 3|sed 's/v//'` && \
mkdir /opt/csv2bufr && \
cd /opt/csv2bufr && \
wget https://github.com/wmo-im/csv2bufr-templates/archive/refs/tags/v${c2bt}.tar.gz && \
tar -zxf v${c2bt}.tar.gz --strip-components=1 csv2bufr-templates-${c2bt}/templates \
3 changes: 3 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ sub centre of the generated BUFR files and the system search path used to find B
- ``BUFR_ORIGINATING_CENTRE``: Specifies the originating centre of the BUFR data, Common Code Table C-11
- ``BUFR_ORIGINATING_SUBCENTRE``: Specifies the originating sub centre of the BUFR data, Common Code Table C-12
- ``CSV2BUFR_TEMPLATES``: Path to search for BUFR templates

Note: the ``BUFR_ORIGINATING_CENTRE`` and ``BUFR_ORIGINATING_SUBCENTRE`` are only used if missing from the
specified :ref:`mapping file <mapping>`).

0 comments on commit 656344e

Please sign in to comment.