Skip to content

Commit 51828d1

Browse files
authored
Fix linter warnings in Cloud SDK-related images (#73)
1 parent e367d61 commit 51828d1

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

cf-cli/Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ FROM buildpack-deps:stretch-curl
22

33
ENV VERSION 0.1
44

5+
# https://github.com/hadolint/hadolint/wiki/DL4006
6+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
7+
58
# ps needs to be available to be able to be used in docker.inside, see https://issues.jenkins-ci.org/browse/JENKINS-40101
69
RUN apt-get update && \
710
apt-get install -y --no-install-recommends procps && \
@@ -10,12 +13,13 @@ RUN apt-get update && \
1013
# add group & user
1114
RUN addgroup -gid 1000 piper && \
1215
useradd piper --uid 1000 --gid 1000 --shell /bin/bash --create-home && \
13-
curl -L --silent "https://cli.run.pivotal.io/stable?release=linux64-binary&source=github" | tar -zx -C /usr/local/bin && \
16+
curl --location --silent "https://cli.run.pivotal.io/stable?release=linux64-binary&source=github" | tar -zx -C /usr/local/bin && \
1417
cf --version
1518

1619
USER piper
1720
WORKDIR /home/piper
1821

22+
# hadolint ignore=DL4001
1923
RUN cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org \
2024
&& cf install-plugin blue-green-deploy -f -r CF-Community \
2125
&& wget --quiet "https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/releases/download/v2.0.13/mta_plugin_linux_amd64" \

jenkins-agent/Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
FROM openjdk:8-jre-slim
22

33
ENV JENKINS_HOME /var/jenkins_home
4-
4+
5+
# https://github.com/hadolint/hadolint/wiki/DL4006
6+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
7+
58
RUN apt-get update && \
69
apt-get install -y --no-install-recommends \
710
git \
@@ -18,7 +21,7 @@ RUN apt-get update && \
1821
$(lsb_release -cs) \
1922
stable" && \
2023
apt-get update && \
21-
apt-get -y install docker-ce && \
24+
apt-get -y --no-install-recommends install docker-ce && \
2225
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
2326

2427
# add group & user

jenkins-master/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ COPY init_jenkins.groovy /usr/share/jenkins/ref/init.groovy.d/init_jenkins.groov
66
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
77
COPY launch-jenkins-agent.sh /usr/share/jenkins/ref/launch-jenkins-agent.sh.override
88

9+
# https://github.com/hadolint/hadolint/wiki/DL4006
10+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
11+
912
RUN apt-get update && \
1013
apt-get install -y --no-install-recommends \
1114
apt-transport-https \

jenkinsfile-runner/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
# Inhereting form 'latest' Jenkins master is ok since this image is controlled by us
2+
# hadolint ignore=DL3006
13
FROM ppiper/jenkins-master
24

5+
# User needs to be root for access to mounted Docker socket
6+
# hadolint ignore=DL3002
37
USER root
48
RUN curl -O https://repo.jenkins-ci.org/releases/io/jenkins/jenkinsfile-runner/jenkinsfile-runner/1.0-beta-7/jenkinsfile-runner-1.0-beta-7-app.zip && \
59
unzip jenkinsfile-runner-1.0-beta-7-app.zip -d jenkinsfile-runner && \

node-browsers/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM node:stretch
22

33
RUN apt-get update && \
4-
apt-get install -y chromium firefox-esr xvfb libxi6 libgconf-2-4 default-jre && \
4+
apt-get install -y --no-install-recommends chromium firefox-esr xvfb libxi6 libgconf-2-4 default-jre && \
55
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
66

77
RUN ln -s /usr/bin/chromium /usr/bin/google-chrome

0 commit comments

Comments
 (0)