-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
43 lines (25 loc) · 978 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
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM golang:bullseye AS configurator
WORKDIR /usr/src/app/
COPY ./tools/configurator ./
RUN go mod download && go mod verify
COPY ./tools/configurator ./
RUN go build -o /usr/src/app/configurator -ldflags "-s -w" -v ./main.go
FROM debian:bullseye-slim AS download
ARG BRANCH=release
WORKDIR /build/
RUN apt-get update
RUN apt-get install -y wget
RUN wget --no-cache -q -O ./altv-voice-server https://cdn.alt-mp.com/voice-server/${BRANCH}/x64_linux/altv-voice-server
FROM debian:bullseye-slim
ARG BRANCH=release
COPY ./.docker/scripts/entrypoint.sh /root/entrypoint.sh
COPY --from=download /build/altv-voice-server /opt/altv-voice-server/server
COPY --from=configurator /usr/src/app/configurator /opt/altv-voice-server/configurator
WORKDIR /opt/altv-voice-server/
RUN apt-get update && \
apt-get install -y libatomic1 && \
chmod +x ./server /root/entrypoint.sh && \
apt-get clean
EXPOSE 7798/udp
EXPOSE 7799/udp
ENTRYPOINT [ "/root/entrypoint.sh" ]