commit 686474f81505b0b7aae323669809dd86f6186427
parent 2c6bd8c9dc67d3e0208e1873d8bf3fef6d8f9aa3
Author: Jeremy Lin <jjlin@users.noreply.github.com>
Date: Sun, 22 Jan 2023 01:21:52 -0800
Disable Hadolint check for consecutive `RUN` instructions (DL3059)
This check doesn't seem to add enough value to justify the difficulties it
tends to create when generating `RUN` instructions from a template.
Diffstat:
18 files changed, 2 insertions(+), 53 deletions(-)
diff --git a/.hadolint.yaml b/.hadolint.yaml
@@ -3,5 +3,7 @@ ignored:
- DL3008
# disable explicit version for apk install
- DL3018
+ # disable check for consecutive `RUN` instructions
+ - DL3059
trustedRegistries:
- docker.io
diff --git a/docker/Dockerfile.j2 b/docker/Dockerfile.j2
@@ -106,7 +106,6 @@ ENV RUSTFLAGS='-Clink-arg=/usr/local/musl/{{ package_arch_target }}/lib/libatomi
{% elif "arm" in target_file %}
#
# Install required build libs for {{ package_arch_name }} architecture.
-# hadolint ignore=DL3059
RUN dpkg --add-architecture {{ package_arch_name }} \
&& apt-get update \
&& apt-get install -y \
@@ -178,7 +177,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN {{ mount_rust_cache -}} cargo build --features ${DB} --release{{ package_arch_target_param }}
######################## RUNTIME IMAGE ########################
@@ -195,7 +193,6 @@ ENV ROCKET_PROFILE="release" \
{% if "amd64" not in target_file %}
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
{% endif %}
@@ -222,13 +219,11 @@ RUN mkdir /data \
{% if "armv6" in target_file and "alpine" not in target_file %}
# In the Balena Bullseye images for armv6/rpi-debian there is a missing symlink.
# This symlink was there in the buster images, and for some reason this is needed.
-# hadolint ignore=DL3059
RUN ln -v -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3
{% endif -%}
{% if "amd64" not in target_file %}
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
{% endif %}
diff --git a/docker/amd64/Dockerfile b/docker/amd64/Dockerfile
@@ -81,7 +81,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN cargo build --features ${DB} --release
######################## RUNTIME IMAGE ########################
diff --git a/docker/amd64/Dockerfile.alpine b/docker/amd64/Dockerfile.alpine
@@ -75,7 +75,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN cargo build --features ${DB} --release --target=x86_64-unknown-linux-musl
######################## RUNTIME IMAGE ########################
diff --git a/docker/amd64/Dockerfile.buildkit b/docker/amd64/Dockerfile.buildkit
@@ -81,7 +81,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.cargo/registry cargo build --features ${DB} --release
######################## RUNTIME IMAGE ########################
diff --git a/docker/amd64/Dockerfile.buildkit.alpine b/docker/amd64/Dockerfile.buildkit.alpine
@@ -75,7 +75,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.cargo/registry cargo build --features ${DB} --release --target=x86_64-unknown-linux-musl
######################## RUNTIME IMAGE ########################
diff --git a/docker/arm64/Dockerfile b/docker/arm64/Dockerfile
@@ -46,7 +46,6 @@ RUN mkdir -pv "${CARGO_HOME}" \
#
# Install required build libs for arm64 architecture.
-# hadolint ignore=DL3059
RUN dpkg --add-architecture arm64 \
&& apt-get update \
&& apt-get install -y \
@@ -101,7 +100,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN cargo build --features ${DB} --release --target=aarch64-unknown-linux-gnu
######################## RUNTIME IMAGE ########################
@@ -113,7 +111,6 @@ ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
ROCKET_PORT=80
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -128,7 +125,6 @@ RUN mkdir /data \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/arm64/Dockerfile.alpine b/docker/arm64/Dockerfile.alpine
@@ -75,7 +75,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN cargo build --features ${DB} --release --target=aarch64-unknown-linux-musl
######################## RUNTIME IMAGE ########################
@@ -89,7 +88,6 @@ ENV ROCKET_PROFILE="release" \
SSL_CERT_DIR=/etc/ssl/certs
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -100,7 +98,6 @@ RUN mkdir /data \
curl \
ca-certificates
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/arm64/Dockerfile.buildkit b/docker/arm64/Dockerfile.buildkit
@@ -46,7 +46,6 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.
#
# Install required build libs for arm64 architecture.
-# hadolint ignore=DL3059
RUN dpkg --add-architecture arm64 \
&& apt-get update \
&& apt-get install -y \
@@ -101,7 +100,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.cargo/registry cargo build --features ${DB} --release --target=aarch64-unknown-linux-gnu
######################## RUNTIME IMAGE ########################
@@ -113,7 +111,6 @@ ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
ROCKET_PORT=80
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -128,7 +125,6 @@ RUN mkdir /data \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/arm64/Dockerfile.buildkit.alpine b/docker/arm64/Dockerfile.buildkit.alpine
@@ -75,7 +75,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.cargo/registry cargo build --features ${DB} --release --target=aarch64-unknown-linux-musl
######################## RUNTIME IMAGE ########################
@@ -89,7 +88,6 @@ ENV ROCKET_PROFILE="release" \
SSL_CERT_DIR=/etc/ssl/certs
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -100,7 +98,6 @@ RUN mkdir /data \
curl \
ca-certificates
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/armv6/Dockerfile b/docker/armv6/Dockerfile
@@ -46,7 +46,6 @@ RUN mkdir -pv "${CARGO_HOME}" \
#
# Install required build libs for armel architecture.
-# hadolint ignore=DL3059
RUN dpkg --add-architecture armel \
&& apt-get update \
&& apt-get install -y \
@@ -101,7 +100,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN cargo build --features ${DB} --release --target=arm-unknown-linux-gnueabi
######################## RUNTIME IMAGE ########################
@@ -113,7 +111,6 @@ ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
ROCKET_PORT=80
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -130,10 +127,8 @@ RUN mkdir /data \
# In the Balena Bullseye images for armv6/rpi-debian there is a missing symlink.
# This symlink was there in the buster images, and for some reason this is needed.
-# hadolint ignore=DL3059
RUN ln -v -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/armv6/Dockerfile.alpine b/docker/armv6/Dockerfile.alpine
@@ -77,7 +77,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN cargo build --features ${DB} --release --target=arm-unknown-linux-musleabi
######################## RUNTIME IMAGE ########################
@@ -91,7 +90,6 @@ ENV ROCKET_PROFILE="release" \
SSL_CERT_DIR=/etc/ssl/certs
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -102,7 +100,6 @@ RUN mkdir /data \
curl \
ca-certificates
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/armv6/Dockerfile.buildkit b/docker/armv6/Dockerfile.buildkit
@@ -46,7 +46,6 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.
#
# Install required build libs for armel architecture.
-# hadolint ignore=DL3059
RUN dpkg --add-architecture armel \
&& apt-get update \
&& apt-get install -y \
@@ -101,7 +100,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.cargo/registry cargo build --features ${DB} --release --target=arm-unknown-linux-gnueabi
######################## RUNTIME IMAGE ########################
@@ -113,7 +111,6 @@ ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
ROCKET_PORT=80
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -130,10 +127,8 @@ RUN mkdir /data \
# In the Balena Bullseye images for armv6/rpi-debian there is a missing symlink.
# This symlink was there in the buster images, and for some reason this is needed.
-# hadolint ignore=DL3059
RUN ln -v -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/armv6/Dockerfile.buildkit.alpine b/docker/armv6/Dockerfile.buildkit.alpine
@@ -77,7 +77,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.cargo/registry cargo build --features ${DB} --release --target=arm-unknown-linux-musleabi
######################## RUNTIME IMAGE ########################
@@ -91,7 +90,6 @@ ENV ROCKET_PROFILE="release" \
SSL_CERT_DIR=/etc/ssl/certs
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -102,7 +100,6 @@ RUN mkdir /data \
curl \
ca-certificates
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/armv7/Dockerfile b/docker/armv7/Dockerfile
@@ -46,7 +46,6 @@ RUN mkdir -pv "${CARGO_HOME}" \
#
# Install required build libs for armhf architecture.
-# hadolint ignore=DL3059
RUN dpkg --add-architecture armhf \
&& apt-get update \
&& apt-get install -y \
@@ -101,7 +100,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN cargo build --features ${DB} --release --target=armv7-unknown-linux-gnueabihf
######################## RUNTIME IMAGE ########################
@@ -113,7 +111,6 @@ ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
ROCKET_PORT=80
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -128,7 +125,6 @@ RUN mkdir /data \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/armv7/Dockerfile.alpine b/docker/armv7/Dockerfile.alpine
@@ -75,7 +75,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN cargo build --features ${DB} --release --target=armv7-unknown-linux-musleabihf
######################## RUNTIME IMAGE ########################
@@ -89,7 +88,6 @@ ENV ROCKET_PROFILE="release" \
SSL_CERT_DIR=/etc/ssl/certs
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -100,7 +98,6 @@ RUN mkdir /data \
curl \
ca-certificates
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/armv7/Dockerfile.buildkit b/docker/armv7/Dockerfile.buildkit
@@ -46,7 +46,6 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.
#
# Install required build libs for armhf architecture.
-# hadolint ignore=DL3059
RUN dpkg --add-architecture armhf \
&& apt-get update \
&& apt-get install -y \
@@ -101,7 +100,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.cargo/registry cargo build --features ${DB} --release --target=armv7-unknown-linux-gnueabihf
######################## RUNTIME IMAGE ########################
@@ -113,7 +111,6 @@ ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
ROCKET_PORT=80
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -128,7 +125,6 @@ RUN mkdir /data \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data
diff --git a/docker/armv7/Dockerfile.buildkit.alpine b/docker/armv7/Dockerfile.buildkit.alpine
@@ -75,7 +75,6 @@ RUN touch src/main.rs
# Builds again, this time it'll just be
# your actual source files being built
-# hadolint ignore=DL3059
RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.cargo/registry cargo build --features ${DB} --release --target=armv7-unknown-linux-musleabihf
######################## RUNTIME IMAGE ########################
@@ -89,7 +88,6 @@ ENV ROCKET_PROFILE="release" \
SSL_CERT_DIR=/etc/ssl/certs
-# hadolint ignore=DL3059
RUN [ "cross-build-start" ]
# Create data folder and Install needed libraries
@@ -100,7 +98,6 @@ RUN mkdir /data \
curl \
ca-certificates
-# hadolint ignore=DL3059
RUN [ "cross-build-end" ]
VOLUME /data