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(docker): explicitly specify shell (#598) #598

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

mdonadoni
Copy link
Member

Fix the JSONArgsRecommended warning by explicitly setting the shell to
be used when running the Dockerfile's CMD command. Note that it is not
possible to switch to the exec form of CMD, as it lacks environment
variable expansion.

Closes #596

Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.28%. Comparing base (3e31e05) to head (fb9923c).
Report is 15 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #598   +/-   ##
=======================================
  Coverage   74.28%   74.28%           
=======================================
  Files          15       15           
  Lines        1466     1466           
=======================================
  Hits         1089     1089           
  Misses        377      377           

Dockerfile Outdated
@@ -85,6 +85,7 @@ EXPOSE 5000
# Run server
# exec is used to make sure signals are propagated to uwsgi,
# while also allowing shell expansion
SHELL ["/bin/bash", "-c"]
Copy link
Member

Choose a reason for hiding this comment

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

Could you move the SHELL directive into its own paragraph, perhaps somewhere at the top of the Dockerfile? E.g. in the Ntupling Service backend we are using:

# Configure shell options
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Fix the `JSONArgsRecommended` warning by explicitly setting the shell to
be used when running the Dockerfile's `CMD` command. Note that it is not
possible to switch to the exec form of `CMD`, as it lacks environment
variable expansion.

Closes reanahub#596
@tiborsimko tiborsimko merged commit fb9923c into reanahub:master Aug 9, 2024
14 checks passed
@mdonadoni mdonadoni deleted the fix-lint-error-dockerfile branch August 9, 2024 10:27
jlemesh pushed a commit to jlemesh/reana-workflow-controller that referenced this pull request Aug 16, 2024
Fix the `JSONArgsRecommended` warning by explicitly setting the shell to
be used when running the Dockerfile's `CMD` command. Note that it is not
possible to switch to the exec form of `CMD`, as it lacks environment
variable expansion.

Closes reanahub#596
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.

build(docker): fix JSONArgsRecommended warning
2 participants