-
Notifications
You must be signed in to change notification settings - Fork 107
Description
Is your feature request related to a problem? Please describe.
pangeo/base-image Dockerfile contains a number of ONBUILD instructions to help the developer with standard installs of additional packages etc.
Unfortunately, none of these work in certain corporate environments where an SSL inspection proxy is used. We see errors from the ONBUILD steps like:
RuntimeError: Download error (60) SSL peer certificate or SSH remote key was not OK [https://conda.anaconda.org/conda-forge/noarch/repodata.json]
SSL certificate problem: self-signed certificate in certificate chain
Describe the solution you'd like
A preBuild step similar to the existing postBuild would be provide a useful point where we could configure the additional certs, proxy environment config, and anything else required before apt-get package installation can succeed.
Describe alternatives you've considered
As a workaround we have to forego the convenience of the provided ONBUILD steps and repeat the same logic in our own Dockerfile which builds FROM pangeo/base-image. We've considered forking pangeo/base-image into our own repo to make these changes possible.
Additional context
Possible code for the preBuild hook (untested):
(Insert at line 117 of https://github.com/pangeo-data/pangeo-docker-images/blob/master/base-image/Dockerfile between existing ONBUILD Checking for binder and Checking for apt.txt )
# If a preBuild file exists, run it
ONBUILD RUN echo "Checking for 'preBuild'..." \
; [ -d binder ] && cd binder \
; [ -d .binder ] && cd .binder \
; if test -f "preBuild" ; then \
chmod +x preBuild \
&& ./preBuild \
; fi