mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Update Dockerfile
This commit is contained in:
parent
8d2de4b8c2
commit
ea9b7e4b12
58
Dockerfile
58
Dockerfile
|
@ -1,6 +1,15 @@
|
||||||
FROM debian:11
|
# Docker image to build DDNet for Linux and Windows (32 bit, 64 bit)
|
||||||
|
# Usage:
|
||||||
|
# 1. Build image
|
||||||
|
# docker build -t ddnet - < Dockerfile
|
||||||
|
# 2. Run the DDNet build script
|
||||||
|
# docker run -it -v PATH_TO_DDNET:/ddnet:ro -v PATH_TO_OUTPUT_DIRECTORY:/build ddnet ./build-all.sh
|
||||||
|
FROM debian:12
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y mingw-w64 \
|
RUN apt-get update && apt-get install -y gcc-mingw-w64-x86-64-posix \
|
||||||
|
g++-mingw-w64-x86-64-posix \
|
||||||
|
gcc-mingw-w64-i686-posix \
|
||||||
|
g++-mingw-w64-i686-posix \
|
||||||
wget \
|
wget \
|
||||||
git \
|
git \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
@ -15,38 +24,45 @@ RUN apt-get update && apt-get install -y mingw-w64 \
|
||||||
libwavpack-dev \
|
libwavpack-dev \
|
||||||
libopusfile-dev \
|
libopusfile-dev \
|
||||||
libsdl2-dev \
|
libsdl2-dev \
|
||||||
cmake
|
cmake \
|
||||||
|
glslang-tools \
|
||||||
|
libavcodec-extra \
|
||||||
|
libavdevice-dev \
|
||||||
|
libavfilter-dev \
|
||||||
|
libavformat-dev \
|
||||||
|
libavutil-dev \
|
||||||
|
libcurl4-openssl-dev \
|
||||||
|
libnotify-dev \
|
||||||
|
libsqlite3-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libvulkan-dev \
|
||||||
|
libx264-dev \
|
||||||
|
spirv-tools \
|
||||||
|
curl
|
||||||
|
|
||||||
RUN git clone --depth=1 https://github.com/tpoechtrager/osxcross.git /osxcross
|
RUN curl https://sh.rustup.rs -sSf | \
|
||||||
RUN /osxcross/tools/get_dependencies.sh
|
sh -s -- --default-toolchain stable -y
|
||||||
|
|
||||||
ARG OSX_SDK_FILE
|
RUN ~/.cargo/bin/rustup toolchain install stable
|
||||||
COPY $OSX_SDK_FILE /osxcross/tarballs/
|
RUN ~/.cargo/bin/rustup target add i686-pc-windows-gnu
|
||||||
RUN ls -la /osxcross/tarballs
|
RUN ~/.cargo/bin/rustup target add x86_64-pc-windows-gnu
|
||||||
RUN UNATTENDED=1 /osxcross/build.sh
|
|
||||||
|
|
||||||
RUN printf '#!/bin/bash\n \
|
RUN printf '#!/bin/bash\n \
|
||||||
|
export PATH=$PATH:$HOME/.cargo/bin\n \
|
||||||
set -x\n \
|
set -x\n \
|
||||||
export PATH=$PATH:/osxcross/target/bin\n \
|
mkdir /build\n \
|
||||||
o32-clang++ -v\n \
|
|
||||||
mkdir /build/linux\n \
|
mkdir /build/linux\n \
|
||||||
cd /build/linux\n \
|
cd /build/linux\n \
|
||||||
pwd\n \
|
pwd\n \
|
||||||
cmake /ddnet && make\n \
|
cmake /ddnet && make -j$(nproc) \n \
|
||||||
mkdir /build/win64\n \
|
mkdir /build/win64\n \
|
||||||
cd /build/win64\n \
|
cd /build/win64\n \
|
||||||
pwd\n \
|
pwd\n \
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=/ddnet/cmake/toolchains/mingw64.toolchain /ddnet && make\n \
|
cmake -DCMAKE_TOOLCHAIN_FILE=/ddnet/cmake/toolchains/mingw64.toolchain /ddnet && make -j$(nproc) \n \
|
||||||
mkdir /build/win32\n \
|
mkdir /build/win32\n \
|
||||||
cd /build/win32\n \
|
cd /build/win32\n \
|
||||||
pwd\n \
|
pwd\n \
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=/ddnet/cmake/toolchains/mingw32.toolchain /ddnet && make\n \
|
cmake -DCMAKE_TOOLCHAIN_FILE=/ddnet/cmake/toolchains/mingw32.toolchain /ddnet && make -j$(nproc) \n' \
|
||||||
mkdir /build/macos\n \
|
> build-all.sh
|
||||||
cd /build/macos\n \
|
|
||||||
pwd\n \
|
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=/ddnet/cmake/toolchains/darwin.toolchain -DCMAKE_OSX_SYSROOT=/osxcross/target/SDK/MacOSX10.11.sdk/ /ddnet && make' \
|
|
||||||
>> build-all.sh
|
|
||||||
RUN chmod +x build-all.sh
|
RUN chmod +x build-all.sh
|
||||||
RUN mkdir /build
|
RUN mkdir /build
|
||||||
|
|
||||||
ADD . /ddnet
|
|
||||||
|
|
Loading…
Reference in a new issue