-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
29 lines (21 loc) · 676 Bytes
/
Dockerfile
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
# Building the application
FROM golang:1.23-alpine
# Installing dependencies
RUN apk add curl git yarn && sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /bin
WORKDIR /go/src/tldrprogress
# Caching go packages
COPY go.mod go.sum ./
RUN go mod download
# Caching yarn packages
COPY resources/package.json resources/yarn.lock resources/
RUN cd resources && yarn
# Building the application
COPY . .
RUN /bin/task build
# Packing the built application in a small container
FROM alpine:latest
WORKDIR /tldrprogress/
VOLUME /tldrprogress/keys/
RUN apk add tzdata
COPY --from=0 /go/src/tldrprogress/out/update /bin/tldrprogress
CMD ["/bin/tldrprogress"]