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

Do not validate variable substitutions in CMD and ENTRYPOINT instructions #89

Closed
rcjsuen opened this issue Feb 27, 2021 · 0 comments
Closed
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Feb 27, 2021

This is an extension to #60 for CMD and ENTRYPOINT instructions reported by microsoft/vscode-docker#2738. We need skip validation of variable substitutions in CMD and ENTRYPOINT instructions as can be dependent on the shell as well.

#escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2019
ENTRYPOINT powershell -Command `
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}

CMD powershell -Command `
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
$ dockerfile-utils lint Dockerfile 
Line: 4
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
                                       ^
Error: failed to process "${env:address}": unsupported modifier (a) in substitution

Line: 4
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
                                                          ^
Error: failed to process "${env:podname}": unsupported modifier (p) in substitution

Line: 4
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
                                                                         ^
Error: failed to process "${env:source}": unsupported modifier (s) in substitution

Line: 4
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
                                                                                       ^
Error: failed to process "${env:dest}": unsupported modifier (d) in substitution

Line: 4
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
                                                                                                      ^
Error: failed to process "${env:namespace}": unsupported modifier (n) in substitution

Line: 7
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
                                       ^
Error: failed to process "${env:address}": unsupported modifier (a) in substitution

Line: 7
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
                                                          ^
Error: failed to process "${env:podname}": unsupported modifier (p) in substitution

Line: 7
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
                                                                         ^
Error: failed to process "${env:source}": unsupported modifier (s) in substitution

Line: 7
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
                                                                                       ^
Error: failed to process "${env:dest}": unsupported modifier (d) in substitution

Line: 7
  kubectl port-forward --address ${env:address} pod/${env:podname} ${env:source}:${env:dest} -n ${env:namespace}
                                                                                                      ^
Error: failed to process "${env:namespace}": unsupported modifier (n) in substitution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant