Skip to content

Commit c2133b8

Browse files
committed
Hadolint recommendations
1 parent 86739a8 commit c2133b8

13 files changed

+44
-35
lines changed

Dockerfile.android

Lines changed: 4 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 11 additions & 9 deletions
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,10 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
1820
ln -sf /usr/bin/gcc-ranlib-8 /usr/bin/gcc-ranlib && \
1921
ln -sf /usr/bin/gcc-ar-8 /usr/bin/gcc-ar && \
2022
ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \
21-
ln -sf /usr/bin/g++-8 /usr/bin/g++
23+
ln -sf /usr/bin/g++-8 /usr/bin/g++ && \
24+
apt-get clean && \
25+
rm -rf /var/lib/apt/lists/ && \
26+
rm ./*.deb
2227

2328
RUN cp -a /root/files/${mono_version} /root && \
2429
cd /root/${mono_version} && \
@@ -33,11 +38,8 @@ RUN cp -a /root/files/${mono_version} /root && \
3338
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 && \
3439
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 && \
3540
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 && \
41+
dpkg -i --force-all ./*.deb && \
3742
sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \
38-
ln -s /usr/bin/mono /usr/bin/cli && \
39-
apt-get clean && \
40-
rm -rf /var/lib/apt/lists/ && \
41-
rm *.deb
43+
ln -s /usr/bin/mono /usr/bin/cli
4244

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

0 commit comments

Comments
 (0)