forked from projecteru2/vmihub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (18 loc) · 695 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
FROM golang:bookworm as gobuilder
WORKDIR /app
COPY . .
ENV GOPROXY https://goproxy.cn,direct
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
RUN apt-get update
RUN apt-get install -y libcephfs-dev librbd-dev librados-dev build-essential
RUN make deps CN=1
RUN make build CN=1
RUN ./bin/vmihub --version
FROM debian:bookworm
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources && \
apt-get update && \
apt-get install -y libcephfs-dev librbd-dev librados-dev genisoimage qemu-utils
WORKDIR /app
COPY --from=gobuilder /app/bin/vmihub .
ENTRYPOINT [ "vmihub" ]
CMD ["--config", "config.toml", "server"]