-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (23 loc) · 692 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (23 loc) · 692 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
# build-web image
FROM oven/bun:1 AS build-web
COPY . /build/
WORKDIR /build/web
ENV NODE_ENV=production
RUN bun install && bun run build
# build-go image
FROM golang:alpine AS build-go
RUN apk add --no-cache make
COPY . /build/
COPY --from=build-web /build/web/dist/ /build/web/dist/
WORKDIR /build
RUN make go-build
# runtime image
FROM alpine:3.23
RUN apk add --no-cache ca-certificates
COPY --from=build-go /build/geoip /usr/local/bin/geoip
# runtime params
VOLUME /data
EXPOSE 8080
WORKDIR /
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CMD ["geoip", "--http.bind-addr", "0.0.0.0:8080", "--db.geoip-path", "/data/geoip.db", "--db.asn-path", "/data/asn.db"]