Improved RUN commands to produce less layers
This commit is contained in:
parent
e95a56c796
commit
8c86cca972
2 changed files with 51 additions and 38 deletions
|
|
@ -18,9 +18,23 @@ RUN ( apt-get -y update && apt-get -y upgrade && apt-get -y install mercurial py
|
||||||
RUN ( dnf -y upgrade && dnf -y install mercurial python3 python3-devel wget ; true)
|
RUN ( dnf -y upgrade && dnf -y install mercurial python3 python3-devel wget ; true)
|
||||||
|
|
||||||
# setup wasi
|
# setup wasi
|
||||||
RUN ( export target_wasi_location=$HOME/.mozbuild/wrlb/ && wget -q https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$wasi_mainversion/wasi-sdk-$wasi_fullversion-linux.tar.gz && tar xf wasi-sdk-$wasi_fullversion-linux.tar.gz && mkdir -p $target_wasi_location && rm -rf $target_wasi_location/wasi-sysroot && cp -r wasi-sdk-$wasi_fullversion/share/wasi-sysroot $target_wasi_location && rm -f wasi-sdk-*.tar.gz* && rm -rf wasi-sdk-* )
|
RUN export target_wasi_location=$HOME/.mozbuild/wrlb/ &&\
|
||||||
|
wget -q https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$wasi_mainversion/wasi-sdk-$wasi_fullversion-linux.tar.gz &&\
|
||||||
|
tar xf wasi-sdk-$wasi_fullversion-linux.tar.gz &&\
|
||||||
|
mkdir -p $target_wasi_location &&\
|
||||||
|
rm -rf $target_wasi_location/wasi-sysroot &&\
|
||||||
|
cp -r wasi-sdk-$wasi_fullversion/share/wasi-sysroot $target_wasi_location &&\
|
||||||
|
rm -f wasi-sdk-*.tar.gz* && rm -rf wasi-sdk-*
|
||||||
|
|
||||||
# run the bootstrap
|
# run the bootstrap
|
||||||
RUN ( wget -q -O librewolf-$version-$source_release.source.tar.gz https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$version-$source_release.source.tar.gz?job=Build && tar xf librewolf-$version-$source_release.source.tar.gz && cd librewolf-$version-$source_release && MOZBUILD_STATE_PATH=$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser && . /root/.cargo/env && cargo install cbindgen && cd .. && rm -rf librewolf-$version-$source_release librewolf-$version-$source_release.source.tar.gz )
|
RUN wget -q -O librewolf-$version-$source_release.source.tar.gz https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$version-$source_release.source.tar.gz?job=Build &&\
|
||||||
|
tar xf librewolf-$version-$source_release.source.tar.gz &&\
|
||||||
|
cd librewolf-$version-$source_release &&\
|
||||||
|
MOZBUILD_STATE_PATH=$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser &&\
|
||||||
|
. /root/.cargo/env &&\
|
||||||
|
cargo install cbindgen &&\
|
||||||
|
cd .. &&\
|
||||||
|
rm -rf librewolf-$version-$source_release librewolf-$version-$source_release.source.tar.gz
|
||||||
|
|
||||||
# our work happens here, on the host filesystem.
|
# our work happens here, on the host filesystem.
|
||||||
WORKDIR /work
|
WORKDIR /work
|
||||||
|
|
|
||||||
|
|
@ -15,48 +15,47 @@ ENV wasi_mainversion 14
|
||||||
|
|
||||||
|
|
||||||
# dependencies needed to run ./mach bootstrap
|
# dependencies needed to run ./mach bootstrap
|
||||||
RUN ( apt-get -y update && apt-get -y upgrade && apt-get -y install mercurial python3 python3-dev python3-pip wget ; true)
|
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install mercurial python3 python3-dev python3-pip wget build-essential libpython3-dev m4 unzip uuid zip libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdbus-glib-1-dev libdrm-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb rsync
|
||||||
|
|
||||||
# setup wasi
|
# setup wasi
|
||||||
RUN ( export target_wasi_location=$HOME/.mozbuild/wrlb/ && wget -q https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$wasi_mainversion/wasi-sdk-$wasi_fullversion-linux.tar.gz && tar xf wasi-sdk-$wasi_fullversion-linux.tar.gz && mkdir -p $target_wasi_location && rm -rf $target_wasi_location/wasi-sysroot && cp -r wasi-sdk-$wasi_fullversion/share/wasi-sysroot $target_wasi_location && rm -f wasi-sdk-*.tar.gz* && rm -rf wasi-sdk-* )
|
RUN export target_wasi_location=$HOME/.mozbuild/wrlb/ &&\
|
||||||
|
wget -q https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$wasi_mainversion/wasi-sdk-$wasi_fullversion-linux.tar.gz &&\
|
||||||
|
tar xf wasi-sdk-$wasi_fullversion-linux.tar.gz &&\
|
||||||
|
mkdir -p $target_wasi_location &&\
|
||||||
|
rm -rf $target_wasi_location/wasi-sysroot &&\
|
||||||
|
cp -r wasi-sdk-$wasi_fullversion/share/wasi-sysroot $target_wasi_location &&\
|
||||||
|
rm -f wasi-sdk-*.tar.gz* && rm -rf wasi-sdk-*
|
||||||
|
|
||||||
# setup osx sdk
|
# setup osx sdk
|
||||||
RUN mkdir -p /osx-cross/MacOSX-SDKs
|
RUN mkdir -p /osx-cross/MacOSX-SDKs &&\
|
||||||
WORKDIR /osx-cross/MacOSX-SDKs
|
cd /osx-cross/MacOSX-SDKs &&\
|
||||||
RUN wget -q "https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz"
|
wget -q "https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz" &&\
|
||||||
RUN tar xf MacOSX11.3.sdk.tar.xz
|
tar xf MacOSX11.3.sdk.tar.xz &&\
|
||||||
RUN rm -f MacOSX11.3.sdk.tar.xz
|
rm -f MacOSX11.3.sdk.tar.xz
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
# run the bootstrap
|
# run the bootstrap
|
||||||
RUN wget -q -O librewolf-$version-$source_release.source.tar.gz https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$version-$source_release.source.tar.gz?job=Build
|
RUN wget -q -O librewolf-$version-$source_release.source.tar.gz https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$version-$source_release.source.tar.gz?job=Build &&\
|
||||||
RUN tar xf librewolf-$version-$source_release.source.tar.gz
|
tar xf librewolf-$version-$source_release.source.tar.gz &&\
|
||||||
|
cd librewolf-$version-$source_release &&\
|
||||||
WORKDIR librewolf-$version-$source_release
|
echo ac_add_options --target=$arch-apple-darwin > mozconfig &&\
|
||||||
RUN echo ac_add_options --target=$arch-apple-darwin > mozconfig
|
echo ac_add_options --enable-bootstrap >> mozconfig &&\
|
||||||
RUN echo ac_add_options --enable-bootstrap >> mozconfig
|
echo ac_add_options --with-macos-sdk=/osx-cross/MacOSX-SDKs/MacOSX11.3.sdk >> mozconfig &&\
|
||||||
RUN echo ac_add_options --with-macos-sdk=/osx-cross/MacOSX-SDKs/MacOSX11.3.sdk >> mozconfig
|
MOZBUILD_STATE_PATH=$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser &&\
|
||||||
|
./mach artifact toolchain --from-build linux64-libdmg &&\
|
||||||
RUN MOZBUILD_STATE_PATH=$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser
|
./mach artifact toolchain --from-build linux64-cctools-port &&\
|
||||||
|
./mach artifact toolchain --from-build linux64-hfsplus &&\
|
||||||
RUN ./mach artifact toolchain --from-build linux64-libdmg
|
./mach artifact toolchain --from-build linux64-binutils &&\
|
||||||
RUN ./mach artifact toolchain --from-build linux64-cctools-port
|
./mach artifact toolchain --from-build linux64-clang-macosx-cross &&\
|
||||||
RUN ./mach artifact toolchain --from-build linux64-hfsplus
|
/root/.cargo/bin/cargo install cbindgen &&\
|
||||||
RUN ./mach artifact toolchain --from-build linux64-binutils
|
/root/.cargo/bin/rustup target add $arch-apple-darwin &&\
|
||||||
RUN ./mach artifact toolchain --from-build linux64-clang-macosx-cross
|
cp -r binutils /root/.mozbuild &&\
|
||||||
RUN /root/.cargo/bin/cargo install cbindgen
|
cp -r cctools /root/.mozbuild &&\
|
||||||
RUN /root/.cargo/bin/rustup target add $arch-apple-darwin
|
cp -r clang /root/.mozbuild &&\
|
||||||
|
cp -r dmg /root/.mozbuild &&\
|
||||||
RUN cp -r binutils /root/.mozbuild
|
cp -r hfsplus-tools /root/.mozbuild &&\
|
||||||
RUN cp -r cctools /root/.mozbuild
|
cd / &&\
|
||||||
RUN cp -r clang /root/.mozbuild
|
rm -rf librewolf-$version-$source_release librewolf-$version-$source_release.source.tar.g &&\
|
||||||
RUN cp -r dmg /root/.mozbuild
|
pip install testresources pycairo
|
||||||
RUN cp -r hfsplus-tools /root/.mozbuild
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
RUN rm -rf librewolf-$version-$source_release librewolf-$version-$source_release.source.tar.g
|
|
||||||
RUN apt-get -y install build-essential libpython3-dev m4 unzip uuid zip libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdbus-glib-1-dev libdrm-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb rsync
|
|
||||||
RUN pip install testresources pycairo
|
|
||||||
|
|
||||||
# our work happens here, on the host filesystem.
|
# our work happens here, on the host filesystem.
|
||||||
WORKDIR /work
|
WORKDIR /work
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue