Skip to content

Commit

Permalink
Merge pull request #371 from mamba-org/update-1.5.1
Browse files Browse the repository at this point in the history
Update to micromamba version 1.5.1
  • Loading branch information
wholtz authored Sep 5, 2023
2 parents e4f55ab + 4d409cb commit 09708b9
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
This change log covers changes to the docker image and does not include
[changes to the micromamba program](https://github.com/mamba-org/mamba/blob/main/CHANGELOG.md).

## 5 September 2023

- Updated to micromamba version 1.5.1
- Added `/usr/local/bin/_apptainer_shell.sh` for use with
`apptainer shell -shell /usr/local/bin/_apptainer_shell.sh ...`
- Added FAQ on use with `apptainer`/`singularity`

## 24 August 2023

- Updated to micromamba version 1.5.0
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG BASE_IMAGE=debian:bookworm-slim
# Mutli-stage build to keep final image small. Otherwise end up with
# curl and openssl installed
FROM --platform=$BUILDPLATFORM $BASE_IMAGE AS stage1
ARG VERSION=1.5.0
ARG VERSION=1.5.1

# hadolint ignore=DL3018
RUN if grep -q '^ID=alpine$' /etc/os-release; then \
Expand Down
3 changes: 3 additions & 0 deletions _apptainer_shell.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

/bin/bash --rcfile /root/.bashrc -i
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
project = 'micromamba-docker'
copyright = '2023, micromamba documentation contributors'
author = 'micromamba documentation contributors'
release = '1.5.0'
release = '1.5.1'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
24 changes: 24 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,27 @@ If you are using the ``actions/checkout`` action, you will need to add the
``--user=root`` option to the ``container`` section of your GitHub Action.
This is because the ``actions/checkout`` action creates a directory in the
container that is owned by ``root``.

How can I use a ``mambaorg/micromamba`` based image with ``apptainer``?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There are three ``apptainer``/``singularity`` sub-commands that can be used to
execute a container:

#. ``apptainer run`` will execute the entrypoint script and automatically
activate the ``base`` environment.

#. ``apptainer exec`` does not execute the entrypoint script and therefore
does not automatically activate the ``base`` environment. By prepending
``/usr/local/bin/_entrypoint.sh`` to the command you want to execute within
the container, you can activate the ``base`` environment. For example:

.. code-block:: console
apptainer exec /usr/local/bin/_entrypoint.sh micromamba info
#. ``apptainer shell`` does not execute the entrypoint script and therefore
does not automatically activate the ``base`` environment. By supplying the
``--shell /usr/local/bin/_apptainer_shell.sh`` option to ``apptainer exec``,
you can activate the ``base`` environment. This option can alternatively be
supplied via the ``APPTAINER_SHELL`` environment variable.
2 changes: 1 addition & 1 deletion examples/add_micromamba/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# bring in the micromamba image so we can copy files from it
FROM mambaorg/micromamba:1.5.0 as micromamba
FROM mambaorg/micromamba:1.5.1 as micromamba

# This is the image we are going add micromaba to:
FROM tomcat:9-jdk17-temurin-focal
Expand Down
2 changes: 1 addition & 1 deletion examples/apt_install/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mambaorg/micromamba:1.5.0
FROM mambaorg/micromamba:1.5.1

COPY --chown=$MAMBA_USER:$MAMBA_USER env.yaml /tmp/env.yaml
RUN micromamba install -y -n base -f /tmp/env.yaml && \
Expand Down
2 changes: 1 addition & 1 deletion examples/cmdline_spec/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mambaorg/micromamba:1.5.0
FROM mambaorg/micromamba:1.5.1
RUN micromamba install -y -n base -c conda-forge \
pyopenssl=20.0.1 \
python=3.9.1 \
Expand Down
2 changes: 1 addition & 1 deletion examples/generate_lock/generate_lock.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docker run --rm -v "$(pwd):/tmp" \
mambaorg/micromamba:1.5.0 /bin/bash -c "\
mambaorg/micromamba:1.5.1 /bin/bash -c "\
micromamba create --yes --name new_env --file env.yaml \
&& micromamba env export --name new_env --explicit" > env.lock
2 changes: 1 addition & 1 deletion examples/install_lock/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mambaorg/micromamba:1.5.0
FROM mambaorg/micromamba:1.5.1
COPY --chown=$MAMBA_USER:$MAMBA_USER env.lock /tmp/env.lock
RUN micromamba install --name base --yes --file /tmp/env.lock \
&& micromamba clean --all --yes
2 changes: 1 addition & 1 deletion examples/modify_username/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mambaorg/micromamba:1.5.0
FROM mambaorg/micromamba:1.5.1
ARG NEW_MAMBA_USER=new-username
ARG NEW_MAMBA_USER_ID=57440
ARG NEW_MAMBA_USER_GID=57440
Expand Down
2 changes: 1 addition & 1 deletion examples/multi_env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mambaorg/micromamba:1.5.0
FROM mambaorg/micromamba:1.5.1
COPY --chown=$MAMBA_USER:$MAMBA_USER env1.yaml /tmp/env1.yaml
COPY --chown=$MAMBA_USER:$MAMBA_USER env2.yaml /tmp/env2.yaml
RUN micromamba create -y -f /tmp/env1.yaml && \
Expand Down
2 changes: 1 addition & 1 deletion examples/new_lock/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mambaorg/micromamba:1.5.0
FROM mambaorg/micromamba:1.5.1
COPY --chown=$MAMBA_USER:$MAMBA_USER env.lock /tmp/env.lock
RUN micromamba create --name my_env_name --yes --file /tmp/env.lock \
&& micromamba clean --all --yes
2 changes: 1 addition & 1 deletion examples/yaml_spec/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mambaorg/micromamba:1.5.0
FROM mambaorg/micromamba:1.5.1
COPY --chown=$MAMBA_USER:$MAMBA_USER env.yaml /tmp/env.yaml
RUN micromamba install -y -n base -f /tmp/env.yaml && \
micromamba clean --all --yes

0 comments on commit 09708b9

Please sign in to comment.