From e404d80d8b538991c0c20dccd1321062cefd138f Mon Sep 17 00:00:00 2001
From: Erick Hitter <git-contrib@ethitter.com>
Date: Fri, 22 Feb 2019 23:14:07 -0800
Subject: [PATCH] Linting

Fixes #1
---
 .hadolint.yaml           |  3 +++
 golang/latest/Dockerfile |  7 ++++++-
 php/5.3/Dockerfile       | 11 +++++++++--
 php/5.6/Dockerfile       | 11 +++++++++--
 php/7.0/Dockerfile       | 11 +++++++++--
 php/7.1/Dockerfile       | 11 +++++++++--
 php/7.2/Dockerfile       | 11 +++++++++--
 php/7.3/Dockerfile       | 11 +++++++++--
 8 files changed, 63 insertions(+), 13 deletions(-)
 create mode 100644 .hadolint.yaml

diff --git a/.hadolint.yaml b/.hadolint.yaml
new file mode 100644
index 0000000..395c31f
--- /dev/null
+++ b/.hadolint.yaml
@@ -0,0 +1,3 @@
+ignored:
+  - DL3007
+  - DL3008
diff --git a/golang/latest/Dockerfile b/golang/latest/Dockerfile
index f5d9b43..ae4e084 100644
--- a/golang/latest/Dockerfile
+++ b/golang/latest/Dockerfile
@@ -1,6 +1,8 @@
 # Base image: https://hub.docker.com/_/golang/
 FROM golang:latest
-MAINTAINER ethitter
+
+LABEL maintainer="ethitter"
+LABEL version="1.0"
 
 # Install golint
 ENV GOPATH /go
@@ -8,9 +10,11 @@ ENV PATH ${GOPATH}/bin:$PATH
 RUN go get -u github.com/golang/lint/golint
 
 # Add apt key for LLVM repository
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
 
 # Add LLVM apt repository
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-5.0 main" | tee -a /etc/apt/sources.list
 
 # Install clang from LLVM repository
@@ -21,4 +25,5 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 
 # Set Clang as default CC
 ENV set_clang /etc/profile.d/set-clang-cc.sh
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN echo "export CC=clang-5.0" | tee -a ${set_clang} && chmod a+x ${set_clang}
diff --git a/php/5.3/Dockerfile b/php/5.3/Dockerfile
index 2eee5f4..6b4a712 100644
--- a/php/5.3/Dockerfile
+++ b/php/5.3/Dockerfile
@@ -1,9 +1,16 @@
 FROM tetraweb/php:5.3
-MAINTAINER ethitter
 
-RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev libmysqlclient-dev libfreetype6-dev libjpeg-dev libxpm-dev --fix-missing
+LABEL maintainer="ethitter"
+LABEL version="1.0"
+
+RUN apt-get update \
+    && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev libmysqlclient-dev libfreetype6-dev libjpeg-dev libxpm-dev --fix-missing --no-install-recommends \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+
 RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
 
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
 RUN chmod +x /usr/local/bin/composer
 
diff --git a/php/5.6/Dockerfile b/php/5.6/Dockerfile
index 21cc36f..e895f85 100644
--- a/php/5.6/Dockerfile
+++ b/php/5.6/Dockerfile
@@ -1,9 +1,16 @@
 FROM php:5.6-stretch
-MAINTAINER ethitter
 
-RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing
+LABEL maintainer="ethitter"
+LABEL version="1.0"
+
+RUN apt-get update \
+    && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing --no-install-recommends \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+
 RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
 
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
 RUN chmod +x /usr/local/bin/composer
 
diff --git a/php/7.0/Dockerfile b/php/7.0/Dockerfile
index 2b5bd5d..48283e7 100644
--- a/php/7.0/Dockerfile
+++ b/php/7.0/Dockerfile
@@ -1,9 +1,16 @@
 FROM php:7.0-stretch
-MAINTAINER ethitter
 
-RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing
+LABEL maintainer="ethitter"
+LABEL version="1.0"
+
+RUN apt-get update \
+    && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing --no-install-recommends \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+
 RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
 
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
 RUN chmod +x /usr/local/bin/composer
 
diff --git a/php/7.1/Dockerfile b/php/7.1/Dockerfile
index bca230c..816f0eb 100644
--- a/php/7.1/Dockerfile
+++ b/php/7.1/Dockerfile
@@ -1,9 +1,16 @@
 FROM php:7.1-stretch
-MAINTAINER ethitter
 
-RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing
+LABEL maintainer="ethitter"
+LABEL version="1.0"
+
+RUN apt-get update \
+    && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing --no-install-recommends \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+
 RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
 
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
 RUN chmod +x /usr/local/bin/composer
 
diff --git a/php/7.2/Dockerfile b/php/7.2/Dockerfile
index d2a0cbe..4d0b947 100644
--- a/php/7.2/Dockerfile
+++ b/php/7.2/Dockerfile
@@ -1,9 +1,16 @@
 FROM php:7.2-stretch
-MAINTAINER ethitter
 
-RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing
+LABEL maintainer="ethitter"
+LABEL version="1.0"
+
+RUN apt-get update \
+    && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing --no-install-recommends \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+
 RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
 
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
 RUN chmod +x /usr/local/bin/composer
 
diff --git a/php/7.3/Dockerfile b/php/7.3/Dockerfile
index 771ddc8..847c4c7 100644
--- a/php/7.3/Dockerfile
+++ b/php/7.3/Dockerfile
@@ -1,9 +1,16 @@
 FROM php:7.3-stretch
-MAINTAINER ethitter
 
-RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev libzip-dev --fix-missing
+LABEL maintainer="ethitter"
+LABEL version="1.0"
+
+RUN apt-get update \
+    && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev libzip-dev --fix-missing --no-install-recommends \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+
 RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
 
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
 RUN chmod +x /usr/local/bin/composer
 
-- 
GitLab