Improve dockerbuild scripts

- recreate output dir
- write output at user's uid
- mount /build dir onto tmpfs
This commit is contained in:
loonycyborg 2019-11-14 17:31:12 +03:00
parent 3a8dc9c361
commit 479278a0d9
4 changed files with 8 additions and 4 deletions

View file

@ -2,4 +2,6 @@
cd mingw
docker build -t mingw-wesnoth .
docker run -it -v "$PWD"/../../..:/wesnoth -v "$PWD"/../mingwbuild:/output mingw-wesnoth
rm -rf ../mingwbuild
mkdir ../mingwbuild
docker run -it -v "$PWD"/../../..:/wesnoth -v "$PWD"/../mingwbuild:/output --tmpfs /build -u $UID mingw-wesnoth

View file

@ -2,4 +2,6 @@
cd steamrt
docker build -t steamos-wesnoth .
docker run -it -v "$PWD"/../../..:/wesnoth -v "$PWD"/../steambuild:/output steamos-wesnoth
rm -rf ../steambuild
mkdir ../steambuild
docker run -it -v "$PWD"/../../..:/wesnoth -v "$PWD"/../steambuild:/output --tmpfs /build:exec -u $UID steamos-wesnoth

View file

@ -17,4 +17,4 @@ RUN pacman-cross -S --noconfirm \
COPY get_dlls.py /scripts/get_dlls.py
ENTRYPOINT mkdir /build && cd /build && scons -j `nproc` arch=x86-64 prefix=/windows/mingw64 gtkdir=/windows/mingw64 host=x86_64-w64-mingw32 -Y /wesnoth && cp /build/wesnoth.exe /output/ && cp /build/wesnothd.exe /output/ && cd /output && python3 /scripts/get_dlls.py
ENTRYPOINT mkdir -p /build && cd /build && scons -j `nproc` arch=x86-64 prefix=/windows/mingw64 gtkdir=/windows/mingw64 host=x86_64-w64-mingw32 -Y /wesnoth && cp /build/wesnoth.exe /output/ && cp /build/wesnothd.exe /output/ && cd /output && python3 /scripts/get_dlls.py

View file

@ -12,4 +12,4 @@ RUN cd /src/boost && ./bootstrap.sh --with-libraries=iostreams,regex,system,file
COPY start.sh /staging/start.sh
RUN mkdir /staging/lib64 && cp /lib/libicu*.so.* /lib/x86_64-linux-gnu/libhistory.so.6 /staging/lib64/
ENTRYPOINT mkdir /build && cd /build && scons -j `nproc` ctool=gcc-5 cxxtool=g++-5 boostdir=/usr/local/include boostlibdir=/usr/local/lib extra_flags_config=-lrt -Y /wesnoth && cp /build/wesnoth /output/ && cp /build/wesnothd /output/ && cp -r /staging/* /output/
ENTRYPOINT mkdir -p /build && cd /build && scons -j `nproc` ctool=gcc-5 cxxtool=g++-5 boostdir=/usr/local/include boostlibdir=/usr/local/lib extra_flags_config=-lrt -Y /wesnoth && cp /build/wesnoth /output/ && cp /build/wesnothd /output/ && cp -r /staging/* /output/