Skip to content

Commit

Permalink
Update subsetservice image to Rocky Linux base.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbartel committed Sep 18, 2023
1 parent fd9a9c2 commit b9da288
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions docker/main/subsetservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,22 @@
ARG docker_internal_registry
FROM ${docker_internal_registry}/dmod-py-sources as sources

# Need to use base, rather than -alpine, image variant, due to C++ lib
# dependencies related to pandas when using the monitordata package.
#FROM python:3.8
FROM rockylinux:8.5

FROM python:3.8-alpine3.15
# Do this separately at the beginning to get some caching help
RUN dnf update -y && \
dnf install -y python39 python39-pip git \
&& ln -s /usr/bin/pip3 /usr/bin/pip \
&& ln -s /usr/bin/python3 /usr/bin/python

ARG comms_package_name
ARG modeldata_package_name
ARG subsetservice_package_name

WORKDIR /code

# Needed until subsetservice package dependencies like hypy, etc. are publish, as opposed to pulled via git
#ARG REQUIRE="git gcc gfortran musl-dev python3-dev libpng-dev"
#RUN apk update && apk upgrade && apk add --no-cache ${REQUIRE}
#RUN apt-get update && apt-get upgrade && apt-get -y install ${REQUIRE}
#RUN ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1

#RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add git gcc gfortran python3 python3-dev py-pip build-base wget geos-dev gdal-dev freetype-dev libpng-dev openblas-dev proj proj-dev proj-util
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
# Might need to make sure some of these are installed later via 'dnf install -y` (now that we've moved to Rocky Linux)
# git gcc gfortran python3 python3-dev py-pip build-base wget geos-dev gdal-dev freetype-dev libpng-dev openblas-dev proj proj-dev proj-util

# Copy custom built packages from external sources image
COPY --from=sources /DIST /DIST
Expand All @@ -32,8 +27,8 @@ COPY ./entrypoint.sh entrypoint.sh
# Install custom and generally available packages, starting with any custom from external source image
# Do these first packages separately first to work around some current issues (2/1/2022)
# TODO: fix root cause for problem this works around
RUN pip install websockets MarkupSafe yarl wrapt \
&& pip install --no-index --find-links=/DIST ${subsetservice_package_name} \
RUN pip install --no-cache websockets MarkupSafe yarl wrapt \
&& pip install --no-cache --find-links=/DIST ${subsetservice_package_name} \
# After eventually installing all custom packages like this, clean up ... \
&& rm -r /DIST

Expand Down

0 comments on commit b9da288

Please sign in to comment.