Skip to content

Commit 795f7a6

Browse files
authored
Enable Docker build checks (#872)
* Enable Docker build checks https://docs.docker.com/build/checks/ A Docker build will now fail if there is a violation against one of the built-in Docker validation rules * Fix validation errors * Update changelog * Update changelog * Update changelog
1 parent cc80981 commit 795f7a6

File tree

28 files changed

+40
-10
lines changed

28 files changed

+40
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ All notable changes to this project will be documented in this file.
2828
- ci: Rename local actions, adjust action inputs and outputs, add definition
2929
README file ([#819]).
3030
- Update cargo-cyclonedx to 0.5.5 and build CycloneDX 1.5 files ([#783])
31+
- Enable [Docker build checks](https://docs.docker.com/build/checks/) ([#872])
3132

3233
### Removed
3334

@@ -68,6 +69,7 @@ All notable changes to this project will be documented in this file.
6869
[#866]: https://github.com/stackabletech/docker-images/pull/866
6970
[#867]: https://github.com/stackabletech/docker-images/pull/867
7071
[#868]: https://github.com/stackabletech/docker-images/pull/868
72+
[#872]: https://github.com/stackabletech/docker-images/pull/872
7173
[#874]: https://github.com/stackabletech/docker-images/pull/874
7274
[#877]: https://github.com/stackabletech/docker-images/pull/877
7375
[#878]: https://github.com/stackabletech/docker-images/pull/878

airflow/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# syntax=docker/dockerfile:1.8.1@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd
2+
# check=error=true
23

34
ARG GIT_SYNC
45

druid/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# syntax=docker/dockerfile:1.8.1@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd
2+
# check=error=true
23

34
FROM stackable/image/java-devel AS druid-builder
45

hadoop/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# syntax=docker/dockerfile:1.8.1@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd
2+
# check=error=true
23

34
FROM stackable/image/java-devel AS builder
45

hbase/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# syntax=docker/dockerfile:1.8.1@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd
2+
# check=error=true
23

34
FROM stackable/image/hadoop AS hadoop-builder
45

@@ -142,7 +143,7 @@ WORKDIR /stackable
142143

143144
# Cache mounts are owned by root by default
144145
# We need to explicitly give the uid to use which is hardcoded to "1000" in stackable-base
145-
RUN --mount=type=cache,id=maven-hbase-operator-tools,uid=1000,target=/stackable/.m2/repository <<EOF
146+
RUN --mount=type=cache,id=maven-hbase-operator-tools-${HBASE_OPERATOR_TOOLS},uid=1000,target=/stackable/.m2/repository <<EOF
146147

147148
curl "https://repo.stackable.tech/repository/packages/hbase-operator-tools/hbase-operator-tools-${HBASE_OPERATOR_TOOLS}-src.tar.gz" | tar -xzC .
148149
mv hbase-operator-tools-${HBASE_OPERATOR_TOOLS} hbase-operator-tools-${HBASE_OPERATOR_TOOLS}-src
@@ -229,7 +230,7 @@ COPY --chown=stackable:stackable hbase/stackable/patches /stackable/patches
229230
USER stackable
230231
WORKDIR /stackable
231232

232-
RUN --mount=type=cache,id=maven-phoenix,uid=1000,target=/stackable/.m2/repository <<EOF
233+
RUN --mount=type=cache,id=maven-phoenix-${PHOENIX},uid=1000,target=/stackable/.m2/repository <<EOF
233234
cd /stackable
234235
curl "https://repo.stackable.tech/repository/packages/phoenix/phoenix-${PHOENIX}-src.tar.gz" | tar -xzC .
235236
mv phoenix-${PHOENIX} phoenix-${PHOENIX}-src

hello-world/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# syntax=docker/dockerfile:1.8.1@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd
2+
# check=error=true
23

34
FROM stackable/image/java-base
45

hive/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# syntax=docker/dockerfile:1.8.1@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd
2+
# check=error=true
23

34
FROM stackable/image/hadoop AS hadoop-builder
45

@@ -24,7 +25,7 @@ WORKDIR /stackable
2425

2526
# Cache mounts are owned by root by default
2627
# We need to explicitly give the uid to use which is hardcoded to "1000" in stackable-base
27-
RUN --mount=type=cache,id=maven-hive,uid=1000,target=/stackable/.m2/repository <<EOF
28+
RUN --mount=type=cache,id=maven-hive-${PRODUCT},uid=1000,target=/stackable/.m2/repository <<EOF
2829
curl "https://repo.stackable.tech/repository/packages/hive/apache-hive-${PRODUCT}-src.tar.gz" | tar -xzC .
2930

3031
patches/apply_patches.sh ${PRODUCT}

java-base/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# syntax=docker/dockerfile:1.8.1@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd
2+
# check=error=true
3+
24
#
35
# Provides the common Java Runtime for SDP products
46
#

java-devel/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# syntax=docker/dockerfile:1.8.1@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd
2+
# check=error=true
23

34
#
45
# Base imaege for builder stages

kafka-testing-tools/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# syntax=docker/dockerfile:1.8.1@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd
2+
# check=error=true
23

34
FROM stackable/image/kcat AS kcat
45

56
FROM stackable/image/stackable-base AS final
67

78
ARG PRODUCT
89
ARG KCAT
10+
ARG RELEASE
911

1012
LABEL name="Kafka Testing Tools" \
1113
maintainer="info@stackable.tech" \

0 commit comments

Comments
 (0)