forked from mehah/otclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (39 loc) · 1.37 KB
/
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
FROM ubuntu:22.04 AS builder
RUN export DEBIAN_FRONTEND=noninteractive \
&& ln -fs /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime
RUN apt-get update && apt-get install -y --no-install-recommends \
git cmake curl zip unzip tar automake ca-certificates build-essential \
libglew-dev libx11-dev autoconf libtool pkg-config tzdata libssl3 \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& apt-get clean && apt-get autoclean
WORKDIR /opt
COPY vcpkg.json /opt
RUN vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ') \
&& echo "vcpkg commit ID: $vcpkgCommitId" \
&& git clone https://github.com/Microsoft/vcpkg.git \
&& cd vcpkg \
&& git checkout $vcpkgCommitId \
&& ./bootstrap-vcpkg.sh
WORKDIR /opt/vcpkg
COPY vcpkg.json /opt/vcpkg/
RUN /opt/vcpkg/vcpkg --feature-flags=binarycaching,manifests,versions install
COPY ./ /otclient/
WORKDIR /otclient/build
RUN cmake -DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake ..
RUN make -j$(nproc)
FROM ubuntu:22.04
RUN apt-get update; \
apt-get install -y \
libluajit-5.1-dev \
libglew-dev \
libx11-dev \
libopenal1 \
libopengl0 \
&& apt-get clean && apt-get autoclean
COPY --from=builder /otclient /otclient
COPY ./data/ /otclient/data/.
COPY ./mods/ /otclient/mods/.
COPY ./modules/ /otclient/modules/.
COPY ./init.lua /otclient/.
WORKDIR /otclient
CMD ["./otclient"]