forked from blacha/diablo2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (35 loc) · 999 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
44
45
46
47
48
49
50
51
52
# Build mapgen in a container
FROM ubuntu:20.04 as build
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests git -y \
mingw-w64
RUN mkdir -p /build/map
COPY ./map /build/map
COPY ./build.mapgen.sh /build
WORKDIR /build
ARG GIT_VERSION
ENV GIT_VERSION ${GIT_VERSION}
ARG GIT_HASH
ENV GIT_HASH ${GIT_HASH}
RUN ./build.mapgen.sh
# Make a run environment with nodejs and wine
FROM tianon/wine:5
RUN apt-get update -yq \
&& apt-get install curl gnupg -yq \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash \
&& apt-get install nodejs -yq
ENV WINEARCH=win32
ENV WINEDEBUG=-all
VOLUME [ "/app/game" ]
WORKDIR /app
RUN npm init --yes
RUN npm install [email protected]
ADD dist/ /app/
COPY --from=build /build/bin/d2-map.exe /app/bin/d2-map.exe
ARG GIT_VERSION
ENV GIT_VERSION ${GIT_VERSION}
ARG GIT_HASH
ENV GIT_HASH ${GIT_HASH}
# Make sure InstallPath exists inside the registry
COPY d2.install.reg /app/
CMD ["node", "index.cjs"]