How to fix Dockerfile FromAsCasing: 'as' and 'FROM' keywords' casing do not match
Problem
When building a Docker image, you see the following warning:
1 warning found (use docker --debug to expand):
- FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 2)
Solution
First note that this is just a warning, not an error. The build will work just fine if you ignore that.
The way to fix it is to find any line containing FROM
and as
like this one:
FROM hugomods/hugo as builder
and make sure that both FROM
and as
are uppercase:
FROM hugomods/hugo AS builder