Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Hadolint recommendations #41

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ ARG img_version
FROM godot-mono:${img_version}

ARG mono_version
ARG mono_commit

RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

script stops if either side of a pipe fail


RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
dnf -y install --setopt=install_weak_deps=False \
gcc gcc-c++ java-1.8.0-openjdk-devel ncurses-compat-libs && \
dnf clean all && \
mkdir sdk && cd sdk && \
curl -LO https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \
unzip sdk-tools-linux-4333796.zip && \
Expand All @@ -18,23 +18,19 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
ENV ANDROID_HOME=/root/sdk/
ENV ANDROID_NDK_ROOT=/root/sdk/ndk-bundle/

RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd /root/mono && \
if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \
git submodule update --init && \
git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \
export MONO_SOURCE_ROOT=/root/mono && \
RUN cp -a /root/files/${mono_version} /root && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
export make="make -j" && \
git clone https://github.com/godotengine/godot-mono-builds /root/godot-mono-builds && \
git clone --progress https://github.com/godotengine/godot-mono-builds /root/godot-mono-builds && \
cd /root/godot-mono-builds && \
git checkout 710b275fbf29ddb03fd5285c51782951a110cdab && \
python3 patch_mono.py && \
python3 android.py configure --target=all-runtime && \
python3 android.py make --target=all-runtime && \
cd /root/mono && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \
cd /root/${mono_version} && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \
cd /root/godot-mono-builds && \
python3 bcl.py make --product=android && \
cd /root && \
rm -rf /root/mono /root/godot-mono-builds
rm -rf /root/${mono_version} /root/godot-mono-builds

CMD /bin/bash
CMD ["/bin/bash"]
5 changes: 2 additions & 3 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ WORKDIR /root

RUN dnf -y upgrade --setopt=install_weak_deps=False && \
dnf -y install --setopt=install_weak_deps=False \
bash bzip2 curl git make patch pkgconfig python3 scons unzip which xz && \
dnf clean all
bash bzip2 curl git make patch pkgconfig python3 scons unzip which xz

CMD /bin/true
CMD ["/bin/bash"]
5 changes: 2 additions & 3 deletions Dockerfile.export
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ ARG img_version
FROM godot-fedora:${img_version}

RUN dnf -y install --setopt=install_weak_deps=False \
xorg-x11-server-Xvfb mesa-dri-drivers libXcursor libXinerama libXrandr libXi alsa-lib pulseaudio-libs java-1.8.0-openjdk-devel && \
dnf clean all
xorg-x11-server-Xvfb mesa-dri-drivers libXcursor libXinerama libXrandr libXi alsa-lib pulseaudio-libs java-1.8.0-openjdk-devel

CMD /bin/bash
CMD ["/bin/bash"]
5 changes: 2 additions & 3 deletions Dockerfile.ios
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ FROM godot-fedora:${img_version}

RUN dnf -y install --setopt=install_weak_deps=False \
automake autoconf clang gcc gcc-c++ gcc-objc gcc-objc++ cmake libicu-devel libtool libxml2-devel llvm-devel openssl-devel perl python yasm && \
dnf clean all && \
git clone https://github.com/tpoechtrager/cctools-port.git && \
git clone --progress https://github.com/tpoechtrager/cctools-port.git && \
cd /root/cctools-port && \
git checkout 8239a5211bcf07d6b9d359782e1a889ec1d7cce5 && \
sed -i 's#./autogen.sh#libtoolize -c -i --force\n./autogen.sh#' usage_examples/ios_toolchain/build.sh && \
Expand All @@ -22,4 +21,4 @@ RUN dnf -y install --setopt=install_weak_deps=False \

ENV OSXCROSS_IOS=not_nothing

CMD /bin/bash
CMD ["/bin/bash"]
26 changes: 11 additions & 15 deletions Dockerfile.javascript
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,32 @@ ARG img_version
FROM godot-mono:${img_version}

ARG mono_version
ARG mono_commit

RUN dnf -y install --setopt=install_weak_deps=False \
RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
dnf -y install --setopt=install_weak_deps=False \
java-openjdk yasm && \
dnf clean all && \
git clone https://github.com/emscripten-core/emsdk && \
git clone --progress https://github.com/emscripten-core/emsdk && \
cd emsdk && \
git checkout a5082b232617c762cb65832429f896c838df2483 && \
./emsdk install 1.38.47-upstream && \
./emsdk activate 1.38.47-upstream && \
echo "source /root/emsdk/emsdk_env.sh" >> /root/.bashrc

RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd /root/mono && \
if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \
git submodule update --init && \
git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \
git apply -3 /root/files/patches/mono-pr16636-wasm-bugfix-and-update.diff && \
export MONO_SOURCE_ROOT=/root/mono && \
RUN cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
patch -p1 < /root/files/patches/mono-pr16636-wasm-bugfix-and-update.diff && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
export make="make -j" && \
git clone https://github.com/godotengine/godot-mono-builds /root/godot-mono-builds && \
git clone --progress https://github.com/godotengine/godot-mono-builds /root/godot-mono-builds && \
cd /root/godot-mono-builds && \
git checkout 710b275fbf29ddb03fd5285c51782951a110cdab && \
python3 patch_emscripten.py && \
python3 wasm.py configure --target=runtime && \
python3 wasm.py make --target=runtime && \
cd /root/mono && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \
cd /root/${mono_version} && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \
cd /root/godot-mono-builds && \
python3 bcl.py make --product wasm && \
cd /root && \
rm -rf /root/mono /root/godot-mono-builds
rm -rf /root/${mono_version} /root/godot-mono-builds

CMD /bin/bash
CMD ["/bin/bash"]
17 changes: 6 additions & 11 deletions Dockerfile.mono
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,23 @@ ARG img_version
FROM godot-fedora:${img_version}

ARG mono_version
ARG mono_commit

RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
dnf -y install --setopt=install_weak_deps=False \
autoconf automake cmake gcc gcc-c++ gettext libtool perl python && \
dnf clean all && \
git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd /root/mono && \
if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \
git submodule update --init && \
git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \
cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm && \
make -j && \
make install && \
cd /root && \
rm -rf /root/${mono_version} && \
cert-sync /etc/pki/tls/certs/ca-bundle.crt && \
rpm -ivh --nodeps \
https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-16.3+xamarinxplat.2019.08.08.00.55-0.xamarin.2.epel8.noarch.rpm \
https://download.mono-project.com/repo/centos8-stable/m/msbuild-libhostfxr/msbuild-libhostfxr-3.0.0.2019.04.16.02.13-0.xamarin.4.epel8.x86_64.rpm \
https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-sdkresolver-16.3+xamarinxplat.2019.08.08.00.55-0.xamarin.2.epel8.noarch.rpm \
https://download.mono-project.com/repo/centos8-stable/n/nuget/nuget-5.2.0.6090.bin-0.xamarin.1.epel8.noarch.rpm && \
rm -rf /root/mono
https://download.mono-project.com/repo/centos8-stable/n/nuget/nuget-5.2.0.6090.bin-0.xamarin.1.epel8.noarch.rpm

CMD /bin/bash
CMD ["/bin/bash"]
6 changes: 2 additions & 4 deletions Dockerfile.mono-glue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ ARG img_version
FROM godot-mono:${img_version}

ARG mono_version
ARG mono_commit

RUN dnf -y install --setopt=install_weak_deps=False \
xorg-x11-server-Xvfb libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel mesa-libGL-devel mesa-libGLU-devel mesa-dri-drivers && \
dnf clean all
xorg-x11-server-Xvfb libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel mesa-libGL-devel mesa-libGLU-devel mesa-dri-drivers

CMD /bin/bash
CMD ["/bin/bash"]
3 changes: 1 addition & 2 deletions Dockerfile.msvc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ENV WINEDEBUG=-all

RUN dnf -y install --setopt=install_weak_deps=False \
wine winetricks xorg-x11-server-Xvfb p7zip-plugins findutils && \
dnf clean all && \
curl -LO https://github.com/GodotBuilder/godot-builds/releases/download/_tools/angle.7z && \
curl -LO https://www.python.org/ftp/python/3.7.2/python-3.7.2-amd64.exe && \
xvfb-run sh -c "winetricks -q vcrun2017; wineserver -w" ;\
Expand All @@ -27,4 +26,4 @@ RUN dnf -y install --setopt=install_weak_deps=False \
rm -rf /root/.wine/drive_c/users/root/Temp/* && \
rm -rf /root/.cache

CMD /bin/bash
CMD ["/bin/bash"]
19 changes: 6 additions & 13 deletions Dockerfile.osx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ ARG img_version
FROM godot-mono:${img_version}

ARG mono_version
ARG mono_commit

RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
dnf -y install --setopt=install_weak_deps=False \
automake autoconf bzip2-devel clang libicu-devel libtool libxml2-devel llvm-devel openssl-devel yasm && \
dnf clean all && \
git clone https://github.com/tpoechtrager/osxcross.git && \
git clone --progress https://github.com/tpoechtrager/osxcross.git && \
cd /root/osxcross && \
git checkout 542acc2ef6c21aeb3f109c03748b1015a71fed63 && \
ln -s /root/files/MacOSX10.14.sdk.tar.xz /root/osxcross/tarballs && \
Expand All @@ -17,11 +15,8 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
ENV OSXCROSS_ROOT=/root/osxcross
ENV PATH="/root/osxcross/target/bin:${PATH}"

RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd /root/mono && \
if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \
git submodule update --init && \
git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \
RUN cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
export CMAKE=/root/osxcross/target/bin/x86_64-apple-darwin18-cmake && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/root/dependencies/mono \
Expand All @@ -46,8 +41,6 @@ RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-bra
mkdir -p /root/dependencies/mono/etc && \
cp -rvp /etc/mono /root/dependencies/mono/etc/ && \
cp /root/files/mono-config-macosx /root/dependencies/mono/etc/mono/config && \
rm -rf /root/mono
rm -rf /root/${mono_version}

ENV MONO64_PREFIX=/root/dependencies/mono

CMD /bin/bash
CMD ["/bin/bash"]
37 changes: 17 additions & 20 deletions Dockerfile.ubuntu-32
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM i386/ubuntu:trusty

ARG mono_version
ARG mono_commit

RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
apt-get update && \
apt-get -y install wget && \
apt-get -y install wget --no-install-recommends && \
cd /root && \
wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | apt-key add - && \
wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8E51A6D660CD88D67D65221D90BD7EACED8E640A' | apt-key add - && \
Expand All @@ -14,35 +15,31 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
apt-get -y update && \
apt-get -y install --no-install-recommends \
autoconf automake bzip2 cmake curl gettext git libtool make perl scons xz-utils \
gcc-8 g++-8 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \
gcc-9 g++-9 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \
libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxinerama-dev yasm && \
ln -sf /usr/bin/gcc-ranlib-8 /usr/bin/gcc-ranlib && \
ln -sf /usr/bin/gcc-ar-8 /usr/bin/gcc-ar && \
ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \
ln -sf /usr/bin/g++-8 /usr/bin/g++
ln -sf /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib && \
ln -sf /usr/bin/gcc-ar-9 /usr/bin/gcc-ar && \
ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \
ln -sf /usr/bin/g++-9 /usr/bin/g++ && \
apt-get clean && \
rm -rf /var/lib/apt/lists/

RUN cd /root && \
git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd /root/mono && \
if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \
git submodule update --init && \
git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \
RUN cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm --host=i386-linux-gnu && \
make -j && \
make install && \
cd /root && \
rm -rf /root/${mono_version} && \
cert-sync /etc/ssl/certs/ca-certificates.crt && \
rm -rf /root/mono && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_i386.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \
dpkg -i --force-all *.deb && \
dpkg -i --force-all ./*.deb && \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid files that begin with - from being interpreted as an option

sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \
ln -s /usr/bin/mono /usr/bin/cli && \
apt-get clean && \
rm -rf /var/lib/apt/lists/ && \
rm *.deb
rm -f ./*.deb

CMD /bin/bash
CMD ["/bin/bash"]
37 changes: 17 additions & 20 deletions Dockerfile.ubuntu-64
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM ubuntu:trusty

ARG mono_version
ARG mono_commit

RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
apt-get update && \
apt-get -y install wget && \
apt-get -y install wget --no-install-recommends && \
cd /root && \
wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | apt-key add - && \
wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8E51A6D660CD88D67D65221D90BD7EACED8E640A' | apt-key add - && \
Expand All @@ -14,35 +15,31 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
apt-get -y update && \
apt-get -y install --no-install-recommends \
autoconf automake bzip2 cmake curl gettext git libtool make perl scons xz-utils \
gcc-8 g++-8 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \
gcc-9 g++-9 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \
libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxinerama-dev yasm && \
ln -sf /usr/bin/gcc-ranlib-8 /usr/bin/gcc-ranlib && \
ln -sf /usr/bin/gcc-ar-8 /usr/bin/gcc-ar && \
ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \
ln -sf /usr/bin/g++-8 /usr/bin/g++
ln -sf /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib && \
ln -sf /usr/bin/gcc-ar-9 /usr/bin/gcc-ar && \
ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \
ln -sf /usr/bin/g++-9 /usr/bin/g++ && \
apt-get clean && \
rm -rf /var/lib/apt/lists/

RUN cd /root && \
git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd /root/mono && \
if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \
git submodule update --init && \
git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \
RUN cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm --host=x86_64-linux-gnu && \
make -j && \
make install && \
cd /root && \
rm -rf /root/${mono_version} && \
cert-sync /etc/ssl/certs/ca-certificates.crt && \
rm -rf /root/mono && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_amd64.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \
dpkg -i --force-all *.deb && \
dpkg -i --force-all ./*.deb && \
sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \
ln -s /usr/bin/mono /usr/bin/cli && \
apt-get clean && \
rm -rf /var/lib/apt/lists/ && \
rm *.deb
rm -f ./*.deb

CMD /bin/bash
CMD ["/bin/bash"]
Loading