Skip to content

Commit 56c585c

Browse files
chore(docker): fix casing of AS keyword to resolve linter warnings
Fixed Dockerfile lint warnings by standardizing the casing of the `AS` keyword in multi-stage builds. This aligns with best practices for Dockerfile formatting and improves compatibility with linting tools used in CI. No functional changes were made — only formatting adjustments to suppress warnings and maintain clean build output. Signed-off-by: Mehfooj <162735469+Savvythelegend@users.noreply.github.com>
1 parent b387fab commit 56c585c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Dockerfile

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
11
ARG GO_VERSION=1.21
22
ARG HTMLTEST_VERSION=0.17.0
33

4-
FROM golang:${GO_VERSION}-alpine as base
4+
FROM golang:${GO_VERSION}-alpine AS base
55
WORKDIR /src
66
RUN apk --update add nodejs npm git gcompat
77

8-
FROM base as node
8+
FROM base AS node
99
COPY package*.json .
1010
ENV NODE_ENV=production
1111
RUN npm install
1212

13-
FROM base as hugo
13+
FROM base AS hugo
1414
ARG HUGO_VERSION=0.122.0
1515
ARG TARGETARCH
1616
WORKDIR /tmp/hugo
1717
RUN wget -O "hugo.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz"
1818
RUN tar -xf "hugo.tar.gz" hugo
1919

20-
FROM base as build-base
20+
FROM base AS build-base
2121
COPY --from=hugo /tmp/hugo/hugo /bin/hugo
2222
COPY --from=node /src/node_modules /src/node_modules
2323
COPY . .
2424

25-
FROM build-base as dev
25+
FROM build-base AS dev
2626

27-
FROM build-base as build
27+
FROM build-base AS build
2828
ARG HUGO_ENV
2929
ARG DOCS_URL
3030
RUN hugo --gc --minify -d /out -e $HUGO_ENV -b $DOCS_URL
3131

32-
FROM scratch as release
32+
FROM scratch AS release
3333
COPY --from=build /out /
3434

35-
FROM scratch as update-stats
35+
FROM scratch AS update-stats
3636
COPY --from=build /src/hugo_stats.json /hugo_stats.json
3737

38-
FROM build as validate-stats
38+
FROM build AS validate-stats
3939
RUN <<EOF
4040
if [ -n "$(git status --porcelain -- hugo_stats.json)" ]; then
4141
echo >&2 'ERROR: hugo_stats.json differs. Update with `docker buildx bake update-stats`'
4242
exit 1
4343
fi
4444
EOF
4545

46-
FROM davidanson/markdownlint-cli2:v0.12.1 as lint
46+
FROM davidanson/markdownlint-cli2:v0.12.1 AS lint
4747
USER root
4848
RUN --mount=type=bind,target=. \
4949
/usr/local/bin/markdownlint-cli2 \
5050
"content/**/*.md" \
5151
"#content/engine/release-notes/*.md" \
5252
"#content/desktop/previous-versions/*.md"
5353

54-
FROM wjdp/htmltest:v${HTMLTEST_VERSION} as test
54+
FROM wjdp/htmltest:v${HTMLTEST_VERSION} AS test
5555
WORKDIR /test
5656
COPY --from=build /out ./public
5757
ADD .htmltest.yml .htmltest.yml
5858
RUN htmltest
5959

60-
FROM build-base as update-modules
60+
FROM build-base AS update-modules
6161
ARG MODULE
6262
RUN <<"EOT"
6363
set -ex
@@ -71,21 +71,21 @@ fi
7171
EOT
7272
RUN hugo mod vendor
7373

74-
FROM scratch as vendor
74+
FROM scratch AS vendor
7575
COPY --from=update-modules /src/_vendor /_vendor
7676
COPY --from=update-modules /src/go.* /
7777

78-
FROM build-base as build-upstream
78+
FROM build-base AS build-upstream
7979
ARG UPSTREAM_MODULE_NAME
8080
ARG UPSTREAM_REPO
8181
ARG UPSTREAM_COMMIT
8282
ENV HUGO_MODULE_REPLACEMENTS="github.com/${UPSTREAM_MODULE_NAME} -> github.com/${UPSTREAM_REPO} ${UPSTREAM_COMMIT}"
8383
RUN hugo --ignoreVendorPaths "github.com/${UPSTREAM_MODULE_NAME}" -d /out
8484

85-
FROM wjdp/htmltest:v${HTMLTEST_VERSION} as validate-upstream
85+
FROM wjdp/htmltest:v${HTMLTEST_VERSION} AS validate-upstream
8686
WORKDIR /test
8787
COPY --from=build-upstream /out ./public
8888
ADD .htmltest.yml .htmltest.yml
8989
RUN htmltest
9090

91-
FROM dev
91+
FROM dev

0 commit comments

Comments
 (0)