mirror of https://github.com/ppy/SDL3-CS.git
Improve Dockerfile
This commit is contained in:
parent
a7f3fe450d
commit
f46a595008
23
Dockerfile
23
Dockerfile
|
|
@ -1,11 +1,20 @@
|
||||||
FROM ubuntu:24.04
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && \
|
||||||
dotnet-sdk-8.0 \
|
apt-get install -y dotnet-sdk-8.0 python3 git build-essential && \
|
||||||
python3 \
|
ln -s /usr/bin/python3 /usr/bin/python
|
||||||
git \
|
|
||||||
build-essential
|
|
||||||
|
|
||||||
RUN ln -s /usr/bin/python3 /usr/bin/python
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
RUN dotnet tool restore && \
|
||||||
|
dotnet restore --ucr SDL3-CS/SDL3-CS.csproj && \
|
||||||
|
rm -r /app
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
WORKDIR /
|
||||||
|
RUN echo '#!/bin/bash' >> entrypoint.sh && \
|
||||||
|
echo 'export LD_LIBRARY_PATH="$(echo ~/.nuget/packages/libclang.runtime.*/*/runtimes/*/native):$(echo ~/.nuget/packages/libclangsharp.runtime.*/*/runtimes/*/native):${LD_LIBRARY_PATH:-}"' >> entrypoint.sh && \
|
||||||
|
echo 'export CPLUS_INCLUDE_PATH="$(echo /usr/lib/gcc/*/*/include):/usr/include:${CPLUS_INCLUDE_PATH:-}"' >> entrypoint.sh && \
|
||||||
|
echo 'python3 SDL3-CS/generate_bindings.py "$@"' >> entrypoint.sh && \
|
||||||
|
chmod +x entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
set -eu
|
set -eu
|
||||||
pushd "$(dirname "$0")/../" >/dev/null
|
pushd "$(dirname "$0")/../" >/dev/null
|
||||||
|
|
||||||
dotnet tool restore
|
#dotnet tool restore
|
||||||
dotnet restore --ucr SDL3-CS/SDL3-CS.csproj
|
#dotnet restore --ucr SDL3-CS/SDL3-CS.csproj
|
||||||
|
#
|
||||||
export LD_LIBRARY_PATH="$(echo ~/.nuget/packages/libclang.runtime.*/*/runtimes/*/native):$(echo ~/.nuget/packages/libclangsharp.runtime.*/*/runtimes/*/native):${LD_LIBRARY_PATH:-}"
|
#export LD_LIBRARY_PATH="$(echo ~/.nuget/packages/libclang.runtime.*/*/runtimes/*/native):$(echo ~/.nuget/packages/libclangsharp.runtime.*/*/runtimes/*/native):${LD_LIBRARY_PATH:-}"
|
||||||
export CPLUS_INCLUDE_PATH="$(echo /usr/lib/gcc/*/*/include):/usr/include:${CPLUS_INCLUDE_PATH:-}"
|
#export CPLUS_INCLUDE_PATH="$(echo /usr/lib/gcc/*/*/include):/usr/include:${CPLUS_INCLUDE_PATH:-}"
|
||||||
|
|
||||||
python3 SDL3-CS/generate_bindings.py "$@"
|
python3 SDL3-CS/generate_bindings.py "$@"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue