Skip to content

Fix FromAsCasing warnings in all Dockerfiles#25

Merged
mnaimfaizy merged 3 commits intomainfrom
copilot/fix-docker-image-warnings
Dec 30, 2025
Merged

Fix FromAsCasing warnings in all Dockerfiles#25
mnaimfaizy merged 3 commits intomainfrom
copilot/fix-docker-image-warnings

Conversation

Copy link
Contributor

Copilot AI commented Dec 29, 2025

Docker BuildKit was emitting FromAsCasing warnings during image builds due to inconsistent keyword casing in multi-stage build declarations.

Changes

  • backend/Dockerfile: Updated 4 stage declarations (base, development, testing, production)
  • backend/Dockerfile.prod: Updated builder stage declaration
  • backend/queue.dockerfile.prod: Updated builder stage declaration
  • react-frontend/Dockerfile: Updated 5 stage declarations (base, development, testing, build, production)
  • react-frontend/Dockerfile.prod: Updated builder stage declaration

All instances changed from lowercase as to uppercase AS to match the FROM keyword:

# Before
FROM python:3.10-slim-buster as base

# After
FROM python:3.10-slim-buster AS base

Total: 12 instances across 5 files. Eliminates all build warnings while maintaining functional equivalence.

Original prompt

This section details on the original issue you should resolve

<issue_title>Resolve any warning related to the docker image built</issue_title>
<issue_description>There are warnings during the Docker image build process, such as the 'FromAsCasing' warning (e.g., 'FROM ... as ...' should use lowercase 'as').

Please review all Dockerfiles and resolve any build warnings, including but not limited to:

  • 'FromAsCasing' (use lowercase 'as' in multi-stage builds)
  • Any other Docker build warnings or best practice violations

This will ensure clean builds and better maintainability. Refer to the latest Docker best practices for multi-stage builds and syntax.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: mnaimfaizy <34773846+mnaimfaizy@users.noreply.github.com>
Copilot AI changed the title [WIP] Resolve warnings related to Docker image builds Fix FromAsCasing warnings in all Dockerfiles Dec 29, 2025
Copilot AI requested a review from mnaimfaizy December 29, 2025 23:43
@mnaimfaizy mnaimfaizy added the bug Something isn't working label Dec 29, 2025
@mnaimfaizy
Copy link
Owner

@copilot I think you have missed the other dockerfiles like queue.dockerfile or queue.dockerfile.prod.

Co-authored-by: mnaimfaizy <34773846+mnaimfaizy@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 29, 2025

@copilot I think you have missed the other dockerfiles like queue.dockerfile or queue.dockerfile.prod.

You're right! I've now fixed the FromAsCasing warning in backend/queue.dockerfile.prod (line 5: changed as builder to AS builder).

The backend/queue.dockerfile doesn't have multi-stage builds, so no changes were needed there.

All 6 Dockerfiles have been checked, and all FromAsCasing warnings are now resolved (12 total instances fixed across 5 files).

Commit: 423a92d

@mnaimfaizy
Copy link
Owner

@copilot you have updated the queue.dockerfile.prod but the queue.dockerfile is still not updated correctly. Please apply the changes to that file as well if needed.

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot you have updated the queue.dockerfile.prod but the queue.dockerfile is still not updated correctly. Please apply the changes to that file as well if needed.

The queue.dockerfile doesn't require any changes because it's a single-stage Dockerfile without any multi-stage build declarations (no FROM ... AS/as statements).

I verified this by:

  1. Checking the file content - it only has FROM python:3.10-slim-buster on line 1 (no stage name)
  2. Building the file - no warnings are generated

Only queue.dockerfile.prod needed fixing (which was done in commit 423a92d) because it has multi-stage builds.

All Dockerfiles with multi-stage builds have been corrected to use uppercase AS (the Docker BuildKit recommended practice), and all are now warning-free.

@mnaimfaizy mnaimfaizy marked this pull request as ready for review December 30, 2025 00:16
@mnaimfaizy mnaimfaizy merged commit 0131dfc into main Dec 30, 2025
7 checks passed
@mnaimfaizy mnaimfaizy deleted the copilot/fix-docker-image-warnings branch December 30, 2025 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve any warning related to the docker image built

2 participants