kipeles commited on
Commit
229acac
·
verified ·
1 Parent(s): 85a6ad8

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM alpine:3.19
2
+
3
+ # 1. Install dependencies
4
+ RUN apk add --no-cache curl jq msmtp ca-certificates tar
5
+
6
+ # 2. Set up Hugging Face non-root user (UID 1000 is required by HF Spaces)
7
+ RUN adduser -D -u 1000 user
8
+ USER user
9
+ ENV HOME=/home/user
10
+ WORKDIR $HOME/app
11
+
12
+ # 3. Download the latest ApexKit release from GitHub
13
+ RUN echo "Downloading latest public release archive..." && \
14
+ LATEST_URL=$(curl -s https://api.github.com/repos/deniskipeles/apexkit/releases/latest | \
15
+ jq -r '.assets[] | select(.name | contains("linux-musl.tar.gz")) | .browser_download_url') && \
16
+ curl -L -o apexkit.tar.gz "$LATEST_URL" && \
17
+ tar -xzf apexkit.tar.gz && \
18
+ chmod +x apexkit && \
19
+ rm apexkit.tar.gz
20
+
21
+ # 4. Create necessary storage directories
22
+ RUN mkdir -p storage/system storage/tenants storage/sandboxes storage/backups
23
+
24
+ # 5. Expose the standard Hugging Face Space port
25
+ EXPOSE 7860
26
+
27
+ # 6. Start the server on port 7860
28
+ CMD ["./apexkit", "--port", "7860"]