Skip to content

Commit

Permalink
Update to Dockerfile to fix GHCR / DHCR issues. (#127)
Browse files Browse the repository at this point in the history
Addition of sphinx to dev requirements (move to requirements-docs.txt?)
Removal of non-root user, default user specific to wis2box but causes permission issues.
  • Loading branch information
david-i-berry authored Feb 6, 2024
1 parent 8be9605 commit 47c9e89
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,23 @@ FROM wmoim/dim_eccodes_baseimage:2.28.0
ENV DEBIAN_FRONTEND="noninteractive" \
TZ="Etc/UTC" \
ECCODES_DIR=/opt/eccodes \
PATH="${PATH}:/opt/eccodes/bin"
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 \
&& pip3 install --no-cache-dir git+https://github.com/wmo-im/csv2bufr-templates@main # ToDo - move to requirements.txt
&& 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

WORKDIR /tmp

COPY . /tmp/csv2bufr

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

RUN groupadd -g 1001 wis2users
RUN useradd -u 1001 wis2user
RUN usermod -aG wis2users wis2user

USER wis2user
WORKDIR /home/wis2user

1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ flake8
pytest
twine
wheel
sphinx
wmo-sphinx-theme

0 comments on commit 47c9e89

Please sign in to comment.