forked from alice-lg/alice-lg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (32 loc) · 730 Bytes
/
Dockerfile
File metadata and controls
47 lines (32 loc) · 730 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
47
#
# Alice - The friendly BGP looking glass
#
# Build frontend first
FROM node:latest AS ui
# Install dependencies
WORKDIR /src/alice-lg/ui
ADD ui/package.json .
ADD ui/yarn.lock .
RUN yarn install
# Add frontend
ADD ui/ .
# Build frontend
RUN yarn build
# Build the backend
FROM golang:1.21 AS backend
# Install dependencies
WORKDIR /src/alice-lg
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
# Add client
COPY --from=ui /src/alice-lg/ui/build ui/build
WORKDIR /src/alice-lg/cmd/alice-lg
RUN make alpine
FROM alpine:latest
RUN apk add -U tzdata
COPY --from=backend /src/alice-lg/cmd/alice-lg/alice-lg-linux-amd64 /usr/bin/alice-lg
RUN ls -lsha /usr/bin/alice-lg
EXPOSE 7340:7340
CMD ["/usr/bin/alice-lg"]