Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/dockerfiles: Update CMD instruction in 'Dockerfile.dev' to use exec form #5742

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mertssmnoglu
Copy link

- What I did

20250113_23h15m03s_grim

I updated the CMD instruction in the dockerfiles/Dockerfile.dev to prevent the JSONArgsRecommended build check warning.

- How I did it

I followed the dockerdocs instructions

- How to verify it

You can run make dev command on the master branch, when the build finished successfully it shows a yellowish "JSONArgsRecommended" warning.

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals (line 50)

Once you switch to the fix-dockerfile-exec-form branch, and re-run make dev you will not see any JSONArgsRecommended warning.

The expected output:
20250113_23h13m33s_grim

  • My Docker CLI Version: 27.2.1
  • Docker Engine Git Commit: 8b539b8df2

- Description for the changelog

Fix "`JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals`"

- A picture of a cute animal (not mandatory but encouraged)

A cute white cat on the tree

CMD bash
CMD ["bash"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be /bin/bash;

docker run -it --rm alpine
ask add --no-cache bash

command -v bash
/bin/bash

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I missed it. Thank you.
40ce68a

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks like the second commit is missing a DCO sign-off, which makes CI fail

could you squash both commits (we prefer not to keep history for fix-ups like this), and amend the commit message so that it has a DCO sign-off?

Let me know if you need help doing so!

@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.48%. Comparing base (b462778) to head (48dbdc6).
Report is 21 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5742      +/-   ##
==========================================
- Coverage   59.51%   59.48%   -0.04%     
==========================================
  Files         346      346              
  Lines       29376    29367       -9     
==========================================
- Hits        17483    17468      -15     
- Misses      10923    10926       +3     
- Partials      970      973       +3     

@mertssmnoglu mertssmnoglu force-pushed the fix-dockerfile-exec-form branch from 40ce68a to 48dbdc6 Compare January 15, 2025 15:33
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.

3 participants