aripbae commited on
Commit
7ee901b
·
verified ·
1 Parent(s): 0e89b72

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM golang:alpine AS builder
2
+
3
+ RUN apk add --no-cache git
4
+
5
+ ENV GOTOOLCHAIN=auto
6
+
7
+ WORKDIR /app
8
+
9
+ RUN git clone $GH_REPO .
10
+ RUN go mod tidy
11
+ RUN go build -o solver ./main.go
12
+
13
+ FROM alpine:latest
14
+
15
+ WORKDIR /app
16
+
17
+ RUN apk add --no-cache \
18
+ chromium \
19
+ xvfb \
20
+ bash \
21
+ ca-certificates \
22
+ ttf-freefont \
23
+ udev
24
+
25
+ COPY --from=builder /app/solver .
26
+
27
+ ENV DEBUG=1 \
28
+ PORT=7860 \
29
+ XVFB_DISPLAY_BASE=99 \
30
+ ALLOW_NO_SANDBOX=true \
31
+ CHROME_PATH=/usr/bin/chromium-browser
32
+
33
+ EXPOSE 7860
34
+
35
+ CMD ["./solver"]