diff --git a/Dockerfile.conda-lock b/Dockerfile.conda-lock index 32dca8d7f0..109b6e5bca 100644 --- a/Dockerfile.conda-lock +++ b/Dockerfile.conda-lock @@ -3,10 +3,10 @@ FROM condaforge/mambaforge:latest ARG USER_UID ARG USER_GID -RUN groupadd --gid "${USER_GID}" flyte \ - && useradd --uid "${USER_UID}" --gid "${USER_GID}" -m flyte +RUN getent group "${USER_GID}" || groupadd --gid "${USER_GID}" flyte +RUN getent passwd "${USER_UID}" || useradd --uid "${USER_UID}" --gid "${USER_GID}" -m flyte RUN conda install -c conda-forge conda-lock WORKDIR flyte -USER flyte +USER ${USER_UID} ENTRYPOINT ["conda", "run", "--no-capture-output", "conda-lock"] diff --git a/Dockerfile.docs b/Dockerfile.docs index 5d1769c8f7..f2e105da86 100644 --- a/Dockerfile.docs +++ b/Dockerfile.docs @@ -3,8 +3,8 @@ FROM condaforge/mambaforge:latest ARG USER_UID ARG USER_GID -RUN groupadd --gid "${USER_GID}" flyte \ - && useradd --uid "${USER_UID}" --gid "${USER_GID}" -m flyte +RUN getent group "${USER_GID}" || groupadd --gid "${USER_GID}" flyte +RUN getent passwd "${USER_UID}" || useradd --uid "${USER_UID}" --gid "${USER_GID}" -m flyte RUN conda install -c conda-forge conda-lock RUN --mount=type=bind,source=monodocs-environment.lock.yaml,target=monodocs-environment.lock.yaml \ @@ -17,5 +17,5 @@ RUN python -m pip install sphinx-autobuild RUN python -m pip install ./flyteidl WORKDIR docs -USER flyte +USER ${USER_UID} ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "monodocs-env"]