diff --git a/Dockerfile b/Dockerfile index d99194bdd..afa56fe05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -#TODO: replace with micromamba -FROM registry.cern.ch/docker.io/mambaorg/micromamba +FROM ghcr.io/diracgrid/diracx/server-base:latest EXPOSE 8000 # Create empty directory for the various volume to be mounted @@ -14,35 +13,4 @@ WORKDIR /code COPY --chown=$MAMBA_USER:$MAMBA_USER . /code/diracx -# openssh is needed for ssh-keygen when we generate signing key -RUN micromamba install --yes --file diracx/environment.yml --name=base git openssh && micromamba clean --all --yes - -ARG MAMBA_DOCKERFILE_ACTIVATE=1 - -RUN pip install ./diracx git+https://github.com/DIRACGrid/DIRAC.git@integration -# Copying in ENTRYPOINT script -COPY --chown=$MAMBA_USER:$MAMBA_USER dockerEntrypoint.sh / -RUN chmod 755 /dockerEntrypoint.sh - -# Copying the mamba specific entrypoint with lower ulimit -COPY --chown=$MAMBA_USER:$MAMBA_USER dockerMicroMambaEntrypoint.sh / -RUN chmod 755 /dockerMicroMambaEntrypoint.sh - -# In many clusters the container is ran as a random uid for security reasons. -# If we mark the conda directory as group 0 and give it group write permissions -# then we're still able to manage the environment from inside the container. -USER 0 -RUN chown -R $MAMBA_USER:0 /opt/conda && chmod -R g=u /opt/conda -USER $MAMBA_USER - -ENTRYPOINT [ "/dockerEntrypoint.sh" ] - - - - -# activate mamba for run commands -# RUN pip install ./diracx - -# CMD ["uvicorn", "--factory", "diracx.routers:create_app", "--host", "0.0.0.0", "--port", "8000"] - -# "--reload-dir", "/opt/conda/lib/python3.11/site-packages/diracx", "--reload" +RUN pip install ./diracx git+https://github.com/DIRACGrid/DIRAC.git@integration diff --git a/dockerEntrypoint.sh b/dockerEntrypoint.sh deleted file mode 100644 index a05444ec6..000000000 --- a/dockerEntrypoint.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -eval "$(micromamba shell hook --shell=posix)" && micromamba activate base - -echo "Running uvicorn with extra options $@" -exec uvicorn --factory diracx.routers:create_app --host 0.0.0.0 --port 8000 "$@" diff --git a/dockerMicroMambaEntrypoint.sh b/dockerMicroMambaEntrypoint.sh deleted file mode 100644 index c04dba7aa..000000000 --- a/dockerMicroMambaEntrypoint.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -ulimit -n 8192 -eval "$(micromamba shell hook --shell=posix)" && micromamba activate base -exec "$@"