-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy pathDockerfile
30 lines (29 loc) · 982 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
30
###################### Stage I ######################
FROM golang:1.22.12 AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2=1.0.8-5+b1 \
git=1:2.39.5-0+deb12u2 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /go/src/repo
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN CGO_ENABLED=0 make
###################### Stage II ######################
FROM ubuntu:24.04
LABEL maintainer="Hypermode Inc. <[email protected]>"
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates=20240203 \
curl=8.5.0-2ubuntu10.6 \
htop=3.3.0-4build1 \
iputils-ping=3:20240117-1build1 \
jq=1.7.1-3build1 \
less=590-2ubuntu2.1 \
sysstat=12.6.1-2 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /go/src/repo/dgraph/dgraph /usr/local/bin/
COPY --from=builder /go/src/repo/contrib/standalone/run.sh /
RUN chmod +x /run.sh
WORKDIR /dgraph
ENV GODEBUG=madvdontneed=1
CMD ["/run.sh"]