diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 8c1ad2a..be0dce1 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -8,7 +8,7 @@ name: Docker on: push: - branches: [ "master", "wi24" ] + branches: [ "master", "*" ] # Publish semver tags as releases. tags: [ 'v*.*.*' ] paths-ignore: @@ -88,6 +88,5 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - target: builder build-args: | "modulename=${{ matrix.modulename }}" \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 26f49e4..39cae79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,9 @@ -# BUILDER CONTAINER -FROM condaforge/mambaforge:4.14.0-0 as builder - -ARG modulename - -COPY ${modulename}.yml /docker/environment.yml - -RUN . /opt/conda/etc/profile.d/conda.sh && \ - mamba create --name lock && \ - conda activate lock && \ - mamba env list && \ - mamba install --yes pip conda-lock>=1.2.2 setuptools wheel && \ - conda-lock lock \ - --platform linux-64 \ - --file /docker/environment.yml \ - --kind lock \ - --lockfile /docker/conda-lock.yml - -RUN . /opt/conda/etc/profile.d/conda.sh && \ - conda activate lock && \ - conda-lock install \ - --mamba \ - --copy \ - --prefix /opt/env \ - /docker/conda-lock.yml - - -# PRODUCTION (AKA PRIMARY) CONTAINER -FROM ucsdets/datahub-base-notebook:2023.1-stable as primary +FROM ucsdets/datahub-base-notebook:2023.1-stable USER root +ARG modulename + RUN sed -i 's:^path-exclude=/usr/share/man:#path-exclude=/usr/share/man:' \ /etc/dpkg/dpkg.cfg.d/excludes @@ -53,8 +27,6 @@ RUN apt-get update && apt-get install -y \ RUN conda config --set channel_priority strict && \ mamba install -y -n base -c conda-forge --override-channels bash_kernel nb_conda_kernels -#KEEP THIS COMMENT LINE - it is replaced dynamically within github actions to install each of the modules - -RUN yes | unminimize || echo "done" - -USER $NB_USER \ No newline at end of file +COPY ${modulename}.yml /tmp +RUN mamba env create --file /tmp/${modulename}.yml && \ + mamba clean -afy \ No newline at end of file