-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
ARG MODULES="all" | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0.402-bookworm-slim-amd64 as base-all | ||
|
||
USER root | ||
|
||
RUN apt-get update -y | ||
RUN apt-get install -y libatomic1 libc-bin wget apt-transport-https ca-certificates gnupg | ||
RUN mkdir -p /etc/apt/keyrings | ||
RUN wget -qO- https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg | ||
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list | ||
RUN apt-get update -y | ||
RUN apt-get install nodejs -y | ||
RUN apt autoremove -y | ||
RUN apt-get clean | ||
|
||
|
||
RUN mkdir /altv | ||
RUN echo '{"loadBytecodeModule":true,"loadCSharpModule":true}' > /altv/.altvpkgrc.json | ||
|
||
FROM node:22.8.0-bookworm-slim as base-js | ||
|
||
USER root | ||
|
||
RUN apt-get update -y | ||
RUN apt-get install -y curl libatomic1 libc-bin wget apt-transport-https ca-certificates gnupg | ||
RUN apt autoremove -y | ||
RUN apt-get clean | ||
|
||
RUN mkdir /altv | ||
RUN echo '{"loadBytecodeModule":true}' > /altv/.altvpkgrc.json | ||
|
||
FROM base-${MODULES} as ready | ||
|
||
USER root | ||
|
||
RUN npm i -g altv-pkg@^2.10.0 | ||
|
||
ADD ./config /root/setup | ||
RUN cd /root/setup && npm i | ||
RUN cd /root/setup && rm voice-server.js package-lock.json | ||
|
||
COPY ./server/entrypoint.sh /root/ | ||
RUN chmod +x /root/entrypoint.sh | ||
|
||
FROM ready as downloaded | ||
|
||
USER root | ||
ARG BRANCH=release | ||
ARG MODULES="all" | ||
ENV ALTV_BRANCH=$BRANCH | ||
ENV ALTV_MODULE_TYPE=$MODULES | ||
|
||
WORKDIR /altv/ | ||
|
||
EXPOSE 7788/udp | ||
EXPOSE 7788/tcp | ||
|
||
ARG CACHEBUST=1 | ||
|
||
RUN cd /altv && npx altv-pkg ${BRANCH} | ||
RUN chmod +x /altv/altv-server | ||
RUN chmod +x /altv/altv-crash-handler | ||
|
||
ENTRYPOINT [ "/root/entrypoint.sh" ] |