diff --git a/CHANGELOG.md b/CHANGELOG.md index c76ad4c..338c58d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### Enhancements made - Mkdir and chown unconditionally and let it throw errors if it fails [#56](https://github.com/2i2c-org/jupyterhub-home-nfs/pull/56) ([@GeorgianaElena](https://github.com/GeorgianaElena)) -- Setup a custom ownership uid:gid of the initial share [#55](https://github.com/2i2c-org/jupyterhub-home-nfs/pull/55) ([@GeorgianaElena](https://github.com/GeorgianaElena), [@yuvipanda](https://github.com/yuvipanda)) +- Setup a custom ownership uid:gid of the initial share [#55](https://github.com/2i2c-org/jupyterhub-home-nfs/pull/55) ([@GeorgianaElena](https://github.com/GeorgianaElena), [@yuvipanda](https://github.com/yuvipanda)) ### Contributors to this release diff --git a/Dockerfile b/Dockerfile index b66e73c..f34a980 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:24.04 AS base RUN apt-get update > /dev/null && \ - apt-get install --yes python3 python3-pip python3-venv xfsprogs > /dev/null && \ + apt-get install --yes python3 python3-pip python3-venv xfsprogs tini > /dev/null && \ apt-get clean && rm -rf /var/lib/apt/lists/* # Create and activate virtual environment @@ -13,6 +13,7 @@ COPY ./pyproject.toml /opt/jupyterhub-home-nfs/pyproject.toml COPY ./README.md /opt/jupyterhub-home-nfs/README.md WORKDIR /opt/jupyterhub-home-nfs +ENTRYPOINT ["tini", "--"] # Development stage FROM base AS dev @@ -29,7 +30,7 @@ COPY ./jupyterhub_home_nfs /opt/jupyterhub-home-nfs/jupyterhub_home_nfs RUN pip install -e . -CMD ["/usr/local/bin/start.sh"] +CMD ["/bin/bash", "/usr/local/bin/start.sh"] # Production stage FROM base AS prod diff --git a/docker-compose.yml b/docker-compose.yml index 57ee43e..165a366 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,6 @@ services: privileged: true # Needed for mounting XFS volumes: - ./jupyterhub_home_nfs:/app - command: /usr/local/bin/start.sh test: profiles: ["test"] # This service will only run when explicitly requested @@ -19,6 +18,11 @@ services: volumes: - ./jupyterhub_home_nfs:/app - ./tests:/app/tests - command: sh -c "/usr/local/bin/mount-xfs.sh && python3 -m pytest -v /app/tests/tests.py" + command: + [ + "/bin/bash", + "-c", + "/usr/local/bin/mount-xfs.sh && python3 -m pytest -v /app/tests/tests.py", + ] environment: - PYTHONPATH=/app diff --git a/helm/jupyterhub-home-nfs/templates/deployment.yaml b/helm/jupyterhub-home-nfs/templates/deployment.yaml index 013bf02..d6a5de7 100644 --- a/helm/jupyterhub-home-nfs/templates/deployment.yaml +++ b/helm/jupyterhub-home-nfs/templates/deployment.yaml @@ -59,7 +59,7 @@ spec: {{- if .Values.quotaEnforcer.enabled }} - name: enforce-xfs-quota image: "{{ .Values.quotaEnforcer.image.repository }}:{{ .Values.quotaEnforcer.image.tag }}" - command: ["python", "-m", "jupyterhub_home_nfs.generate", "--config-file", "/etc/jupyterhub-home-nfs/mounted-secret/quota-enforcer-config.py"] + args: ["python", "-m", "jupyterhub_home_nfs.generate", "--config-file", "/etc/jupyterhub-home-nfs/mounted-secret/quota-enforcer-config.py"] securityContext: privileged: true volumeMounts: @@ -73,7 +73,7 @@ spec: - name: auto-xfs-resizer # Use same image as quotaEnforcer as it has xfs_growfs image: "{{ .Values.quotaEnforcer.image.repository }}:{{ .Values.quotaEnforcer.image.tag }}" - command: + args: - /bin/bash - -c - |