Skip to content

Commit e6b220d

Browse files
committed
Hadolint recommendations
1 parent 5914b9f commit e6b220d

13 files changed

+42
-33
lines changed

Dockerfile.android

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ FROM godot-mono:${img_version}
33

44
ARG mono_version
55

6-
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
6+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
7+
8+
RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
79
dnf -y install --setopt=install_weak_deps=False \
810
gcc gcc-c++ java-1.8.0-openjdk-devel ncurses-compat-libs && \
911
mkdir sdk && cd sdk && \
@@ -31,4 +33,4 @@ RUN cp -a /root/files/${mono_version} /root && \
3133
cd /root && \
3234
rm -rf /root/${mono_version} /root/godot-mono-builds
3335

34-
CMD /bin/bash
36+
CMD ["/bin/bash"]

Dockerfile.base

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ RUN dnf -y upgrade --setopt=install_weak_deps=False && \
66
dnf -y install --setopt=install_weak_deps=False \
77
bash bzip2 curl git make patch pkgconfig python3 scons unzip which xz
88

9-
CMD /bin/bash
9+
CMD ["/bin/bash"]

Dockerfile.export

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ FROM godot-fedora:${img_version}
44
RUN dnf -y install --setopt=install_weak_deps=False \
55
xorg-x11-server-Xvfb mesa-dri-drivers libXcursor libXinerama libXrandr libXi alsa-lib pulseaudio-libs java-1.8.0-openjdk-devel
66

7-
CMD /bin/bash
7+
CMD ["/bin/bash"]

Dockerfile.ios

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ RUN dnf -y install --setopt=install_weak_deps=False \
2121

2222
ENV OSXCROSS_IOS=not_nothing
2323

24-
CMD /bin/bash
24+
CMD ["/bin/bash"]

Dockerfile.javascript

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ RUN cp -a /root/files/${mono_version} /root && \
3030
cd /root && \
3131
rm -rf /root/${mono_version} /root/godot-mono-builds
3232

33-
CMD /bin/bash
33+
CMD ["/bin/bash"]

Dockerfile.mono

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM godot-fedora:${img_version}
33

44
ARG mono_version
55

6-
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
6+
RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
77
dnf -y install --setopt=install_weak_deps=False \
88
autoconf automake cmake gcc gcc-c++ gettext libtool perl python && \
99
cp -a /root/files/${mono_version} /root && \
@@ -21,4 +21,4 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
2121
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 \
2222
https://download.mono-project.com/repo/centos8-stable/n/nuget/nuget-5.2.0.6090.bin-0.xamarin.1.epel8.noarch.rpm
2323

24-
CMD /bin/bash
24+
CMD ["/bin/bash"]

Dockerfile.mono-glue

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ ARG mono_version
66
RUN dnf -y install --setopt=install_weak_deps=False \
77
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
88

9-
CMD /bin/bash
9+
CMD ["/bin/bash"]

Dockerfile.msvc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ RUN dnf -y install --setopt=install_weak_deps=False \
2626
rm -rf /root/.wine/drive_c/users/root/Temp/* && \
2727
rm -rf /root/.cache
2828

29-
CMD /bin/bash
29+
CMD ["/bin/bash"]

Dockerfile.osx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM godot-mono:${img_version}
33

44
ARG mono_version
55

6-
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
6+
RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
77
dnf -y install --setopt=install_weak_deps=False \
88
automake autoconf bzip2-devel clang libicu-devel libtool libxml2-devel llvm-devel openssl-devel yasm && \
99
git clone --progress https://github.com/tpoechtrager/osxcross.git && \
@@ -43,4 +43,4 @@ RUN cp -a /root/files/${mono_version} /root && \
4343
cp /root/files/mono-config-macosx /root/dependencies/mono/etc/mono/config && \
4444
rm -rf /root/${mono_version}
4545

46-
CMD /bin/bash
46+
CMD ["/bin/bash"]

Dockerfile.ubuntu-32

+10-8
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ FROM i386/ubuntu:trusty
22

33
ARG mono_version
44

5-
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
5+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
6+
7+
RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
68
apt-get update && \
7-
apt-get -y install wget && \
9+
apt-get -y install wget --no-install-recommends && \
810
cd /root && \
911
wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | apt-key add - && \
1012
wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8E51A6D660CD88D67D65221D90BD7EACED8E640A' | apt-key add - && \
@@ -18,7 +20,9 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
1820
ln -sf /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib && \
1921
ln -sf /usr/bin/gcc-ar-9 /usr/bin/gcc-ar && \
2022
ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \
21-
ln -sf /usr/bin/g++-9 /usr/bin/g++
23+
ln -sf /usr/bin/g++-9 /usr/bin/g++ && \
24+
apt-get clean && \
25+
rm -rf /var/lib/apt/lists/
2226

2327
RUN cp -a /root/files/${mono_version} /root && \
2428
cd /root/${mono_version} && \
@@ -33,11 +37,9 @@ RUN cp -a /root/files/${mono_version} /root && \
3337
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 && \
3438
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 && \
3539
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \
36-
dpkg -i --force-all *.deb && \
40+
dpkg -i --force-all ./*.deb && \
3741
sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \
3842
ln -s /usr/bin/mono /usr/bin/cli && \
39-
apt-get clean && \
40-
rm -rf /var/lib/apt/lists/ && \
41-
rm *.deb
43+
rm -f ./*.deb
4244

43-
CMD /bin/bash
45+
CMD ["/bin/bash"]

Dockerfile.ubuntu-64

+10-8
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ FROM ubuntu:trusty
22

33
ARG mono_version
44

5-
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
5+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
6+
7+
RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
68
apt-get update && \
7-
apt-get -y install wget && \
9+
apt-get -y install wget --no-install-recommends && \
810
cd /root && \
911
wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | apt-key add - && \
1012
wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8E51A6D660CD88D67D65221D90BD7EACED8E640A' | apt-key add - && \
@@ -18,7 +20,9 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
1820
ln -sf /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib && \
1921
ln -sf /usr/bin/gcc-ar-9 /usr/bin/gcc-ar && \
2022
ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \
21-
ln -sf /usr/bin/g++-9 /usr/bin/g++
23+
ln -sf /usr/bin/g++-9 /usr/bin/g++ && \
24+
apt-get clean && \
25+
rm -rf /var/lib/apt/lists/
2226

2327
RUN cp -a /root/files/${mono_version} /root && \
2428
cd /root/${mono_version} && \
@@ -33,11 +37,9 @@ RUN cp -a /root/files/${mono_version} /root && \
3337
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 && \
3438
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 && \
3539
wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \
36-
dpkg -i --force-all *.deb && \
40+
dpkg -i --force-all ./*.deb && \
3741
sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \
3842
ln -s /usr/bin/mono /usr/bin/cli && \
39-
apt-get clean && \
40-
rm -rf /var/lib/apt/lists/ && \
41-
rm *.deb
43+
rm -f ./*.deb
4244

43-
CMD /bin/bash
45+
CMD ["/bin/bash"]

Dockerfile.windows

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM godot-mono:${img_version}
33

44
ARG mono_version
55

6-
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
6+
RUN if [ -z "${mono_version}" ]; then "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \
77
dnf -y install --setopt=install_weak_deps=False \
88
mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static yasm wine && \
99
cp -a /root/files/${mono_version} /root && \
@@ -28,4 +28,4 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
2828
cp -rvp /etc/mono /root/dependencies/mono-32/etc && \
2929
dnf -y remove wine
3030

31-
CMD /bin/bash
31+
CMD ["/bin/bash"]

Dockerfile.xcode

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM godot-fedora:${img_version}
22

3+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4+
35
RUN dnf -y install --setopt=install_weak_deps=False \
46
autoconf automake libtool clang cmake fuse fuse-devel libxml2-devel libicu-devel compat-openssl10-devel bzip2-devel kmod cpio && \
57
git clone --progress https://github.com/mackyle/xar.git && \
@@ -11,9 +13,8 @@ RUN dnf -y install --setopt=install_weak_deps=False \
1113
git clone --progress https://github.com/NiklasRosenstein/pbzx && \
1214
cd pbzx && \
1315
git checkout 2a4d7c3300c826d918def713a24d25c237c8ed53 && \
14-
clang -O3 -llzma -lxar -I /usr/local/include pbzx.c -o pbzx
15-
16-
CMD mkdir -p /root/xcode && \
16+
clang -O3 -llzma -lxar -I /usr/local/include pbzx.c -o pbzx && \
17+
mkdir -p /root/xcode && \
1718
cd /root/xcode && \
1819
xar -xf /root/files/Xcode_10.3.xip && \
1920
/root/pbzx/pbzx -n Content | cpio -i && \
@@ -40,3 +41,5 @@ CMD mkdir -p /root/xcode && \
4041
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/iPhoneOS12.4.sdk/usr/include/c++/ && \
4142
cd /tmp && \
4243
tar -cJf /root/files/iPhoneSimulator12.4.sdk.tar.xz iPhoneOS12.4.sdk
44+
45+
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)