Skip to content

Commit

Permalink
feat(monodocs): Skip create user if exists
Browse files Browse the repository at this point in the history
Signed-off-by: Chi-Sheng Liu <[email protected]>
  • Loading branch information
MortalHappiness committed Mar 5, 2024
1 parent 81fd331 commit 33ecd2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Dockerfile.conda-lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
6 changes: 3 additions & 3 deletions Dockerfile.docs
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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"]

0 comments on commit 33ecd2f

Please sign in to comment.