From 9e78d7fbc395fa348eea0f8064893e169354ef77 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Sun, 12 Feb 2023 20:45:13 -0500 Subject: [PATCH] update docker build system --- Dockerfile | 52 ++++-------------------------------------------- docker-build.bat | 10 ++-------- 2 files changed, 6 insertions(+), 56 deletions(-) diff --git a/Dockerfile b/Dockerfile index c52ccf4..2c5d516 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,56 +1,12 @@ -FROM fedora:31 +FROM fedora:36 LABEL description="Build environment for segatools" -RUN yum -y install meson -RUN yum -y install ninja-build -RUN yum -y install make -RUN yum -y install zip -RUN yum -y install clang -RUN yum -y install mingw64-gcc.x86_64 -RUN yum -y install mingw32-gcc.x86_64 -RUN yum -y install git +RUN dnf -y install meson ninja-build make zip clang mingw64-gcc.x86_64 mingw32-gcc.x86_64 git RUN mkdir /segatools WORKDIR /segatools -COPY aimeio aimeio -COPY amex amex -COPY board board -COPY chunihook chunihook -COPY chuniio chuniio -COPY cxbhook cxbhook -COPY cxbio cxbio -COPY dist dist -COPY divahook divahook -COPY divaio divaio -COPY carolhook carolhook -COPY carolio carolio -COPY doc doc -COPY hooklib hooklib -COPY iccard iccard -COPY idzhook idzhook -COPY idzio idzio -COPY mercuryhook mercuryhook -COPY mercuryio mercuryio -COPY jvs jvs -COPY minihook minihook -COPY mu3hook mu3hook -COPY mu3io mu3io -COPY pki pki -COPY platform platform -COPY gfxhook gfxhook -COPY reg reg -COPY spike spike -COPY subprojects subprojects -COPY util util -COPY CHANGELOG.md CHANGELOG.md -COPY cross-mingw-32.txt cross-mingw-32.txt -COPY cross-mingw-64.txt cross-mingw-64.txt -COPY Makefile Makefile -COPY meson.build meson.build -COPY Package.mk Package.mk -COPY precompiled.h precompiled.h -COPY README.md README.md +VOLUME [ "/segatools" ] -RUN make dist \ No newline at end of file +ENTRYPOINT [ "make", "dist" ] diff --git a/docker-build.bat b/docker-build.bat index eea0e31..1b0ce12 100644 --- a/docker-build.bat +++ b/docker-build.bat @@ -13,19 +13,13 @@ if ERRORLEVEL 1 ( goto failure ) -docker create --name %CONTAINER_NAME% %IMAGE_NAME% +docker run -it --rm -v %~dp0:/segatools --name %CONTAINER_NAME% %IMAGE_NAME% if ERRORLEVEL 1 ( goto failure ) -rd /s /q "!BUILD_OUTPUT_PATH!" -mkdir "!BUILD_OUTPUT_PATH!" - -docker cp %CONTAINER_NAME%:/segatools/build/zip %BUILD_OUTPUT_PATH% - -docker rm -f %CONTAINER_NAME% > nul -docker image rm -f %IMAGE_NAME% > nul +docker image rm -f %IMAGE_NAME% goto success