summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: ff53f8cac6077726e8c6c78e454b2f17cd8a45c0 (plain) (blame)
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
# syntax=docker/dockerfile:1

FROM registry.altlinux.org/alt/node:p11 AS node
WORKDIR /app
COPY package.json /app
COPY package-lock.json /app
COPY web /app/web
RUN npm i && npm run esbuild

FROM gitrepo.ru/base/go:1.23.0 AS go

WORKDIR /app

COPY go.mod go.sum ./
RUN go mod download

COPY . .

RUN CGO_ENABLED=0 GOOS=linux go build -o /app/track

FROM registry.altlinux.org/alt/alt:p11

WORKDIR /app

COPY --from=go /app/track /app/track
COPY --from=node /app/web /app/web

CMD ["/app/track"]