-
Here is what I am doing now and it seems working: FROM mambaorg/micromamba:1.4.4-alpine@sha256:7bc1b7179496b7f10596ba8fce7ffd8d323566890b9f515bf1c3dd2cca1c627e
# Required for `apk add ...`
USER root
# Required for `pip install -e .`
RUN apk add --no-cache git
WORKDIR /app
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.linux.lock.txt .
RUN micromamba install -y -n base -f environment.linux.lock.txt && micromamba clean --all --yes
ARG MAMBA_DOCKERFILE_ACTIVATE=1
COPY --chown=$MAMBA_USER:$MAMBA_USER . .
RUN pip install --no-cache-dir -r requirements.txt
# Discards `USER root` above
USER $MAMBA_USER Would it be better to do: # Required for `apk add ...`
USER root
# Required for `pip install -e .`
RUN apk add --no-cache git
# Discards `USER root` above
USER $MAMBA_USER and only then run What is the best practice of using It would be cool to be able to run just |
Beta Was this translation helpful? Give feedback.
Answered by
maresb
Jun 18, 2023
Replies: 1 comment 3 replies
-
It depends on who you want the owner of the You can also consider installing Git with |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
GarrisonD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It depends on who you want the owner of the
micromamba install
ed files to be. I usually switch back toMAMBA_USER
as soon as possible so thatMAMBA_USER
owns everything.You can also consider installing Git with
micromamba
; it is on conda-forge after all 😉