HuggingFace0920 commited on
Commit
50f8dd1
verified
1 Parent(s): 617e293

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -27
Dockerfile CHANGED
@@ -1,35 +1,19 @@
1
- # Use a newer version of Go that meets the requirement (1.23 or higher)
2
- FROM golang:1.23-alpine AS builder
3
 
4
- # Install build dependencies
5
- RUN apk add --no-cache git
6
 
7
- # Set the working directory
8
- WORKDIR /app
9
 
10
- # Clone the bark-server repository
11
- RUN git clone https://github.com/Finb/bark-server.git .
12
 
13
- # Build the application
14
- RUN go build -o bark-server ./cmd/bark
15
 
16
- # Create the final lightweight image
17
- FROM alpine:3.18
18
 
19
- # Install necessary runtime dependencies
20
- RUN apk add --no-cache ca-certificates tzdata
21
 
22
- # Set the working directory
23
- WORKDIR /app
24
 
25
- # Copy the built binary from the builder stage
26
- COPY --from=builder /app/bark-server .
27
-
28
- # Expose the default port (8080 as per the repository)
29
- EXPOSE 8080
30
-
31
- # Set the entrypoint to run the server
32
- ENTRYPOINT ["./bark-server"]
33
-
34
- # Default command (can be overridden)
35
- CMD ["serve"]
 
1
+ FROM finab/bark-server:latest
 
2
 
3
+ ARG TIMEZONE=Asia/Shanghai
 
4
 
5
+ ENV TZ=${TIMEZONE}
 
6
 
7
+ RUN mkdir -p /data && \
8
+ chmod 777 /data
9
 
10
+ VOLUME /data
 
11
 
12
+ COPY ./entrypoint.sh /entrypoint.sh
 
13
 
14
+ RUN chmod +x /entrypoint.sh
 
15
 
16
+ ENTRYPOINT ["/entrypoint.sh"]
 
17
 
18
+ # 璁剧疆榛樿鍛戒护
19
+ CMD ["bark-server"]