trying rootless
Browse files- Dockerfile +2 -14
- README.md +1 -0
Dockerfile
CHANGED
|
@@ -1,18 +1,7 @@
|
|
| 1 |
FROM neo4j:2025.09.0-community
|
| 2 |
|
| 3 |
-
# set user and id to user and 1000 for HF Spaces (base image sets user and id to neo4j and 7474)
|
| 4 |
-
RUN useradd -m -u 1000 user
|
| 5 |
-
RUN find /startup -uid 7474 -exec chown -h 1000 {} +
|
| 6 |
-
RUN find /logs -uid 7474 -exec chown -h 1000 {} +
|
| 7 |
-
RUN find /data -uid 7474 -exec chown -h 1000 {} +
|
| 8 |
-
RUN find "${NEO4J_HOME}" -uid 7474 -exec chown -h 1000 {} +
|
| 9 |
-
|
| 10 |
# neo4j
|
| 11 |
RUN mkdir -p /backups
|
| 12 |
-
RUN chown user /backups
|
| 13 |
-
RUN chmod 777 /backups
|
| 14 |
-
RUN chown user /var/lib/neo4j/conf/neo4j.conf
|
| 15 |
-
RUN chown user /var/lib/neo4j/conf/neo4j-admin.conf
|
| 16 |
RUN chmod 640 /var/lib/neo4j/conf/neo4j.conf
|
| 17 |
RUN chmod 640 /var/lib/neo4j/conf/neo4j-admin.conf
|
| 18 |
ENV NEO4J_PLUGINS='["graph-data-science"]'
|
|
@@ -23,11 +12,10 @@ RUN apt-get update \
|
|
| 23 |
&& rm -rf /var/lib/apt/lists/*
|
| 24 |
|
| 25 |
# app
|
| 26 |
-
ADD
|
| 27 |
RUN pip install -r /application_neo4j/requirements.txt
|
| 28 |
|
| 29 |
# start
|
| 30 |
-
|
| 31 |
-
COPY --chown=user start.sh start.sh
|
| 32 |
ENTRYPOINT ["/bin/bash"]
|
| 33 |
CMD ["./start.sh"]
|
|
|
|
| 1 |
FROM neo4j:2025.09.0-community
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
# neo4j
|
| 4 |
RUN mkdir -p /backups
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
RUN chmod 640 /var/lib/neo4j/conf/neo4j.conf
|
| 6 |
RUN chmod 640 /var/lib/neo4j/conf/neo4j-admin.conf
|
| 7 |
ENV NEO4J_PLUGINS='["graph-data-science"]'
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
# app
|
| 15 |
+
ADD application_neo4j /application_neo4j
|
| 16 |
RUN pip install -r /application_neo4j/requirements.txt
|
| 17 |
|
| 18 |
# start
|
| 19 |
+
COPY start.sh start.sh
|
|
|
|
| 20 |
ENTRYPOINT ["/bin/bash"]
|
| 21 |
CMD ["./start.sh"]
|
README.md
CHANGED
|
@@ -5,6 +5,7 @@ colorFrom: yellow
|
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
+
rootless: true
|
| 9 |
---
|
| 10 |
|
| 11 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|