aboutsummaryrefslogtreecommitdiff
path: root/mission/jwst
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-04-10 09:30:45 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-04-10 09:30:45 -0400
commit66636245e4457fd0458539c8468f3da5e0afe095 (patch)
tree9177462f7cedd0708483d80627949fd6e361d3be /mission/jwst
parent0ea9c8f57be2ee8aaf4a6818f188704a69a5e634 (diff)
downloadstasis-66636245e4457fd0458539c8468f3da5e0afe095.tar.gz
Update Dockerfile templates
* Move ADD calls to improve docker build's caching behavior * Replace template strings with package paths * Give the "developer" user access to the generated spec file on-disk
Diffstat (limited to 'mission/jwst')
-rw-r--r--mission/jwst/Dockerfile.in14
1 files changed, 8 insertions, 6 deletions
diff --git a/mission/jwst/Dockerfile.in b/mission/jwst/Dockerfile.in
index 4bfe90f..c360f9b 100644
--- a/mission/jwst/Dockerfile.in
+++ b/mission/jwst/Dockerfile.in
@@ -8,6 +8,7 @@ ARG DIST_URL=https://github.com/conda-forge/miniforge/releases/download/${DIST_V
ARG CONDA_PACKAGES
# Pipeline environment snapshot definition
ARG SNAPSHOT_INPUT
+ARG SNAPSHOT_PKGDIR
# Declare environment
ENV OPT=/opt \
HOME=/home/developer
@@ -45,8 +46,6 @@ RUN groupadd developer \
&& useradd -g developer -m -d $HOME -s /bin/bash developer \
&& echo "developer:developer" | chpasswd \
&& echo "developer ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
-# Get delivery snapshot
-ADD ${SNAPSHOT_INPUT} ${HOME}/SNAPSHOT.yml
# Install Miniforge
# Reset permissions
RUN curl -q -OSsL ${DIST_URL}/${DIST_INSTALLER} \
@@ -60,14 +59,17 @@ RUN curl -q -OSsL ${DIST_URL}/${DIST_INSTALLER} \
&& chown -R developer: ${OPT} ${HOME}
# Configure Conda
ENV PATH "${DIST_PATH}/bin:${PATH}"
+# Get delivery snapshot
+ADD ${SNAPSHOT_INPUT} ${HOME}/SNAPSHOT.yml
+ADD ${SNAPSHOT_PKGDIR} ${HOME}/packages
+RUN chown -R developer: ${HOME}
USER developer
RUN conda config --set auto_update_conda false \
&& conda config --set always_yes true \
&& conda config --set quiet true \
- && conda config --set rollback_enabled false \
- && source /etc/profile.d/conda.sh \
- && source /etc/profile.d/mamba.sh \
- && mamba install \
+ && conda config --set rollback_enabled false
+RUN sed -i -e "s|@CONDA_CHANNEL@|${HOME}/packages/conda|;s|@PIP_ARGUMENTS@|--extra-index-url ${HOME}/packages/wheels|;" ${HOME}/SNAPSHOT.yml
+RUN mamba install \
git \
${CONDA_PACKAGES} \
&& mamba env create -n linux --file ${HOME}/SNAPSHOT.yml