Basant Amatya commited on
Commit
9e1ad2c
·
1 Parent(s): 5f073bf

Dockerfile adjusted as per huggingface Dockerspaces

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -1
Dockerfile CHANGED
@@ -2,5 +2,30 @@
2
  # you will also find guides on how best to write your Dockerfile
3
 
4
  FROM docker.io/searxng/searxng:latest
5
- COPY ./searxng /etc/searxng
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  EXPOSE 8080/tcp
 
2
  # you will also find guides on how best to write your Dockerfile
3
 
4
  FROM docker.io/searxng/searxng:latest
5
+ #COPY ./searxng /etc/searxng
6
+ #EXPOSE 8080/tcp
7
+
8
+ # Set up a new user named "user" with user ID 1000
9
+ RUN useradd -m -u 1000 user
10
+
11
+ # Switch to the "user" user
12
+ USER user
13
+
14
+ # Set home to the user's home directory
15
+ ENV HOME=/home/user \
16
+ PATH=/home/user/.local/bin:$PATH
17
+
18
+ # Set the working directory to the user's home directory
19
+ WORKDIR $HOME/app
20
+
21
+ # Try and run pip command after setting the user with `USER user` to avoid permission issues with Python
22
+ #RUN pip install --no-cache-dir --upgrade pip
23
+
24
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
25
+ #COPY --chown=user . $HOME/app
26
+ COPY --chown=user ./searxng /etc/searxng
27
+
28
+ # Download a checkpoint
29
+ #RUN mkdir content
30
+ #ADD --chown=user https://<SOME_ASSET_URL> content/<SOME_ASSET_NAME>
31
  EXPOSE 8080/tcp