Skip to content

Fix warnings from docker buildx#1695

Merged
lfdebrux merged 2 commits into
mainfrom
ldeb-fix-docker-lint-warnings
Oct 31, 2025
Merged

Fix warnings from docker buildx#1695
lfdebrux merged 2 commits into
mainfrom
ldeb-fix-docker-lint-warnings

Conversation

@lfdebrux
Copy link
Copy Markdown
Contributor

@lfdebrux lfdebrux commented Oct 28, 2025

What problem does this pull request solve?

Since we started using docker buildx in CI [1], we've been getting check annotations with linting warnings for the Dockerfile in all PRs (even ones which don't change the Dockerfile), which is very annoying.

This commit fixes all the warnings:

  • UndefinedVar
    • NODE_ENV needs to be declared as a build argument
    • RAILS_ENV needs to be declared as a build argument in all independent stages
    • There is unlikely to be a need to set REDIS_URL to anything specific, always set it to the same dummy value

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

@lfdebrux lfdebrux force-pushed the ldeb-fix-docker-lint-warnings branch from fe87359 to 9ef2223 Compare October 31, 2025 08:30
@github-actions
Copy link
Copy Markdown
Contributor

🎉 A review copy of this PR has been deployed! It is made of up two components

  1. A review copy of forms-runner
  2. A production copy of forms-admin

Important

Not all of the functionality of forms-runner is present in review apps.
Functionality such as sending emails, file upload, and S3 submission types are
deliberately disabled for the sake of simplifying review apps.

You should use the full dev environment to test the functionality which is disabled here.

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

Since we started using docker buildx in CI [[1]], we've been getting
check annotations with linting warnings for the Dockerfile in all PRs
(even ones which don't change the Dockerfile), which is very annoying.

This commit fixes all the warnings:

  - UndefinedVar
    - NODE_ENV needs to be declared as a build argument
    - RAILS_ENV needs to be declared as a build argument in all
      independent stages
    - There is unlikely to be a need to set REDIS_URL to anything
      specific, always set it to the same dummy value

[1]: #1687
`npm` wants us to use `--omit=dev` instead of `--only=production`.
@lfdebrux lfdebrux force-pushed the ldeb-fix-docker-lint-warnings branch from 9ef2223 to 1c549a0 Compare October 31, 2025 09:52
@lfdebrux lfdebrux enabled auto-merge October 31, 2025 09:52
@sonarqubecloud
Copy link
Copy Markdown

@lfdebrux lfdebrux merged commit f13ff18 into main Oct 31, 2025
4 of 5 checks passed
@lfdebrux lfdebrux deleted the ldeb-fix-docker-lint-warnings branch October 31, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants