cypress-io / cypress-docker-images

Docker images with Cypress dependencies and browsers
https://on.cypress.io/continuous-integration
MIT License
1.02k stars 380 forks source link

WARN: FromAsCasing when building Docker image on Linux #1139

Closed MikeMcC399 closed 3 months ago

MikeMcC399 commented 3 months ago

Issue

When running docker compose build factory under Docker Desktop for Linux, a warning is output:

=> [factory internal] load build definition from factory.Dockerfile => => transferring dockerfile: 4.84kB => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)

The Build check FromAsCasing reports a cosmetic formatting inconsistency.

Similar warning messages are also present in CircleCI when images are built to be released to Docker Hub.

Environment

Ubuntu 22.04.4 LTS Node.js v20.15.0 Docker version 27.0.3 Docker Desktop 4.31.0 (153195)

Steps to reproduce

git clone https://github.com/cypress-io/cypress-docker-images
cd cypress-docker-images
npm ci
cd factory
docker compose build factory

Logs

$ cd factory
$ docker compose build factory
[+] Building 83.6s (10/10) FINISHED                                                                        docker-container:builder
 => [factory internal] booting buildkit                                                                                       16.0s
 => => pulling image moby/buildkit:buildx-stable-1                                                                            15.4s
 => => creating container buildx_buildkit_builder0                                                                             0.5s
 => [factory internal] load build definition from factory.Dockerfile                                                           0.0s
 => => transferring dockerfile: 4.84kB                                                                                         0.0s
 => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)                                                 0.0s
 => [factory internal] load metadata for docker.io/library/debian:12-slim                                                      2.4s
 => [factory internal] load .dockerignore                                                                                      0.0s
 => => transferring context: 2B                                                                                                0.0s
 => [factory 1/3] FROM docker.io/library/debian:12-slim@sha256:f528891ab1aa484bf7233dbcc84f3c806c3e427571d75510a9d74bb5ec535b  4.3s
 => => resolve docker.io/library/debian:12-slim@sha256:f528891ab1aa484bf7233dbcc84f3c806c3e427571d75510a9d74bb5ec535b33        0.0s
 => => sha256:f11c1adaa26e078479ccdd45312ea3b88476441b91be0ec898a7e07bfd05badc 29.13MB / 29.13MB                               3.7s
 => => extracting sha256:f11c1adaa26e078479ccdd45312ea3b88476441b91be0ec898a7e07bfd05badc                                      0.5s
 => [factory internal] load build context                                                                                      0.0s
 => => transferring context: 14.11kB                                                                                           0.0s
 => [factory 2/3] RUN ls -la /root   && chmod 777 /root   && apt-get update   && apt-get install --no-install-recommends -y   43.1s
 => [factory 3/3] COPY ./installScripts /opt/installScripts                                                                    0.1s 
 => [factory] exporting to docker image format                                                                                17.6s 
 => => exporting layers                                                                                                       11.6s 
 => => exporting manifest sha256:9537848362e4c2cb974ac4676db880a74a3ef7fa32d8ca51dbcd5f2c0190bd8c                              0.0s 
 => => exporting config sha256:81b2c8c04e207476d6cfe745a5a403e76b2611248918f4da92317172a78fb5a2                                0.0s 
 => => sending tarball                                                                                                         6.0s 
 => [factory] importing to docker                                                                                              4.0s
 => => loading layer 32148f9f6c5a 294.91kB / 29.13MB                                                                           4.0s
 => => loading layer 276926a83c45 134.81MB / 161.91MB                                                                          3.2s
 => => loading layer 85bc2f8c3f13 4.61kB / 4.61kB                                                                              0.0s
alejosv commented 2 months ago

I have the same error with the same docker version and OS

MikeMcC399 commented 2 months ago

@alejosv

I have the same error with the same docker version and OS

The issue I described here has already been resolved. If you are still seeing it, then make sure that you have updated your local clone of the repo to the latest commit (https://github.com/cypress-io/cypress-docker-images/commit/5322a16ceecb87a232475d4822c4f8fdef48cc96).