forked from FabianTerhorst/coreclr-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DockerfileExecutable
43 lines (32 loc) · 1.25 KB
/
DockerfileExecutable
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 7hazard/node-clang-7 as clang
# build coreclr-module
WORKDIR /runtime
COPY runtime/ .
RUN sh linux-build.sh
WORKDIR /runtime/cmake-build-linux/src
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 as dotnet
# build example resource
WORKDIR /altv-example/
COPY api/ .
# RUN cd AltV.Net.Executable.Example && dotnet publish -c Release -r linux-x64
RUN cd AltV.Net.Executable.Example && dotnet publish -c Release
FROM ubuntu:18.04
# install valgrind
RUN apt-get update && apt-get install -y valgrind
# construct server structure
WORKDIR /altv-server
COPY altv-server .
COPY server.cfg .
COPY start.sh .
COPY resource-executable.cfg resources/example/resource.cfg
COPY assembly.cfg resources/example/assembly.cfg
COPY data/ ./data
COPY --from=clang /runtime/cmake-build-linux/src/libcsharp-module.so modules/
# COPY --from=dotnet /altv-example/AltV.Net.Executable.Example/bin/Release/netcoreapp2.2/linux-x64 resources/example/
COPY --from=dotnet /altv-example/AltV.Net.Executable.Example/bin/Release/netcoreapp2.2/publish resources/example/
COPY --from=dotnet /usr/share/dotnet/shared/Microsoft.NETCore.App /usr/share/dotnet/shared/Microsoft.NETCore.App
RUN chmod +x ./altv-server
EXPOSE 7788/udp
EXPOSE 7788/tcp
ENTRYPOINT ["tail", "-f", "/dev/null"]
#CMD ./altv-server