-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from tonistiigi/tonistiigi/20240619-deps-updates
update dockerfile and linting dependencies
- Loading branch information
Showing
12 changed files
with
82 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# syntax = docker/dockerfile:1.5 | ||
FROM koalaman/shellcheck-alpine:v0.7.2 | ||
# syntax=docker/dockerfile:1.8 | ||
# check=error=true | ||
|
||
FROM koalaman/shellcheck-alpine:v0.10.0 | ||
WORKDIR /src | ||
COPY src . | ||
RUN shellcheck xx-* | ||
RUN --mount=type=bind,src=src shellcheck xx-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,33 @@ | ||
# syntax = docker/dockerfile:1.5 | ||
FROM mvdan/shfmt:v3.2.1-alpine AS shfmt | ||
# syntax=docker/dockerfile:1.8 | ||
# check=error=true | ||
|
||
FROM mvdan/shfmt:v3.8.0-alpine AS shfmt | ||
WORKDIR /src | ||
ARG SHFMT_FLAGS="-i 2 -ci" | ||
|
||
FROM shfmt AS generate | ||
WORKDIR /out | ||
RUN --mount=target=/src \ | ||
cp -a /src/* ./ && \ | ||
shfmt -l -w -ln posix $SHFMT_FLAGS . && \ | ||
for f in */test-*.bats; do shfmt -l -w -ln bats $SHFMT_FLAGS "$f"; done | ||
RUN --mount=target=/src <<EOF | ||
set -ex | ||
cp -a /src/* ./ | ||
for f in */xx-*; do | ||
shfmt -l -w -ln posix $SHFMT_FLAGS "$f"; | ||
done | ||
for f in */test-*.bats; do | ||
shfmt -l -w -ln bats $SHFMT_FLAGS "$f"; | ||
done | ||
EOF | ||
|
||
FROM scratch AS update | ||
COPY --from=generate /out / | ||
|
||
FROM shfmt AS validate | ||
RUN --mount=target=. \ | ||
shfmt -ln posix $SHFMT_FLAGS -d . && \ | ||
for f in */test-*.bats; do shfmt -ln bats $SHFMT_FLAGS -d "$f" || return; done; | ||
RUN --mount=type=bind <<EOF | ||
set -ex | ||
for f in */xx-*; do | ||
shfmt -ln posix $SHFMT_FLAGS -d "$f" | ||
done | ||
for f in */test-*.bats; do | ||
shfmt -ln bats $SHFMT_FLAGS -d "$f" | ||
done | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters