-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (19 loc) · 746 Bytes
/
Dockerfile
File metadata and controls
29 lines (19 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM golang:1.19-alpine AS builder
# Install git.
# Git is required for fetching the dependencies.
# Make is requiered for build.
RUN apk update && apk add --no-cache git make ca-certificates
WORKDIR /go/src/github.com/MontFerret/worker
COPY . .
# Build the binary.
RUN CGO_ENABLED=0 GOOS=linux make compile
# Build the final container. And install
FROM montferret/chromium:111.0.5563.0 as runner
RUN apt-get update && apt-get install -y dumb-init
# Add in certs
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.c
# Add worker binary
COPY --from=builder /go/src/github.com/MontFerret/worker/bin/worker .
EXPOSE 8080
ENTRYPOINT ["dumb-init", "--"]
CMD ["/bin/sh", "-c", "./entrypoint.sh & ./worker"]