Skip to content

Conversation

vbvictor
Copy link
Contributor

Fixes https://docs.docker.com/reference/build-checks/from-as-casing/
which also gives warning when building container from command line:

=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)                                                                                        
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)                                                                                        
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 40)                                                                                       
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 100)

@llvmbot
Copy link
Member

llvmbot commented Sep 27, 2025

@llvm/pr-subscribers-github-workflow

Author: Baranov Victor (vbvictor)

Changes

Fixes https://docs.docker.com/reference/build-checks/from-as-casing/
which also gives warning when building container from command line:

=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)                                                                                        
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)                                                                                        
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 40)                                                                                       
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 100)

Full diff: https://github.com/llvm/llvm-project/pull/161017.diff

1 Files Affected:

  • (modified) .github/workflows/containers/github-action-ci/Dockerfile (+4-4)
diff --git a/.github/workflows/containers/github-action-ci/Dockerfile b/.github/workflows/containers/github-action-ci/Dockerfile
index f5422b4527576..c887dc7418abf 100644
--- a/.github/workflows/containers/github-action-ci/Dockerfile
+++ b/.github/workflows/containers/github-action-ci/Dockerfile
@@ -1,7 +1,7 @@
-FROM docker.io/library/ubuntu:24.04 as base
+FROM docker.io/library/ubuntu:24.04 AS base
 ENV LLVM_SYSROOT=/opt/llvm
 
-FROM base as stage1-toolchain
+FROM base AS stage1-toolchain
 ENV LLVM_VERSION=21.1.0
 
 RUN apt-get update && \
@@ -37,7 +37,7 @@ RUN cmake -B ./build -G Ninja ./llvm \
 
 RUN ninja -C ./build stage2-clang-bolt stage2-install-distribution && ninja -C ./build install-distribution
 
-FROM base as ci-container
+FROM base AS ci-container
 
 COPY --from=stage1-toolchain $LLVM_SYSROOT $LLVM_SYSROOT
 
@@ -97,7 +97,7 @@ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
 USER gha
 WORKDIR /home/gha
 
-FROM ci-container as ci-container-agent
+FROM ci-container AS ci-container-agent
 
 ENV GITHUB_RUNNER_VERSION=2.328.0
 

@vbvictor vbvictor force-pushed the fix-from-as-casing-docker branch from 4b25ecf to 8f9c38d Compare September 27, 2025 19:49
@vbvictor vbvictor merged commit 08c057e into llvm:main Sep 27, 2025
14 checks passed
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
…161017)

Fixes https://docs.docker.com/reference/build-checks/from-as-casing/
which also gives warning when building container from command line:
```
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)                                                                                        
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)                                                                                        
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 40)                                                                                       
=> WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 100)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants