Skip to content

Commit 67f8e9c

Browse files
committed
Add docker syntax directive and a validation check
1 parent 9f90926 commit 67f8e9c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/pr_pre-commit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
with:
1919
python-version: '3.12'
2020
- name: Setup Hadolint
21+
# We need to download this here due to a bug in the pre-commit/hadolint setup
22+
# https://github.com/hadolint/hadolint/issues/886
2123
shell: bash
2224
run: |
2325
set -euo pipefail

template/docker/Dockerfile.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
# syntax=docker/dockerfile:1.10.0@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5
12
# =============
23
# This file is automatically generated from the templates in stackabletech/operator-templating
34
# DON'T MANUALLY EDIT THIS FILE
45
# =============
6+
# NOTE: The syntax directive needs to be the first line in a Dockerfile
7+
# https://docs.docker.com/build/checks/#fail-build-on-check-violations
8+
# check=error=true
59
FROM oci.stackable.tech/sdp/ubi9-rust-builder AS builder
610

711
FROM registry.access.redhat.com/ubi9/ubi-minimal AS operator

0 commit comments

Comments
 (0)