-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (32 loc) · 944 Bytes
/
Dockerfile
File metadata and controls
46 lines (32 loc) · 944 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# syntax=docker/dockerfile:1
##
## Build the application from source
##
FROM golang:latest AS build
WORKDIR /app
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go build -o ./netflixify ./cmd/api/main.go
#
# Run the tests in the container
#
FROM build
RUN go test -v ./tests
##
## Deploy the application binary into a lean image
##
# final image
# https://github.com/chromedp/docker-headless-shell#using-as-a-base-image
FROM chromedp/headless-shell:latest
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates dumb-init fonts-noto fonts-noto-cjk \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/
COPY --from=build /app/netflixify /usr/local/bin
ENV URL https://netflixify.onrender.com
ENV BOT_TOKEN=6836197587:AAHdUrYAAINPDN1V4OhS4aAFDLDTzxE_eqU
# ENV PORT 3000
EXPOSE $PORT
ENTRYPOINT ["dumb-init", "--"]
CMD [ "netflixify" ]