Skip to content

Instantly share code, notes, and snippets.

@tyrrminal
Created June 29, 2022 16:47
Show Gist options
  • Save tyrrminal/ca546fd61bf8414dbeb3b49fbc0ed881 to your computer and use it in GitHub Desktop.
Save tyrrminal/ca546fd61bf8414dbeb3b49fbc0ed881 to your computer and use it in GitHub Desktop.
PerlNavigator for docker-on-remote use
#!/usr/bin/env bash
exec docker run \
--rm `# Delete container after running` \
-i `# Run interactively (allow pipes)` \
-v "${HOME}/.vscode-server/extensions":"${HOME}/.vscode-server/extensions" `# Link PerlNavigator resources into container` \
-v `pwd`:`pwd` `# Link source code into container` \
-v "${HOME}/srv/perl5/lib/perl5:/development/perl5/linting" `# Link local::lib with just Perl::Tidy and Perl::Critic into container` \
-v `pwd`/.perltidyrc:/cfg/perltidyrc `# Link PerlTidy and PerlCritic configs into container` \
-v `pwd`/.perlcriticrc:/cfg/perlcriticrc \
--entrypoint perl `# Run perl command inside container` \
<image name> `# Docker image containing dependencies/env/config/etc` \
$@ `# Pass remaining arguments to perl`
{
"folders": [
{
"path": "..."
}
],
"settings": {
"perlnavigator.perlPath": "<HOME>/srv/shims/<project>-shim.sh",
"perlnavigator.perltidyProfile": "/cfg/perltidyrc",
"perlnavigator.perlcriticProfile": "/cfg/perlcriticrc",
"perlnavigator.includePaths": [
"/development/perl5/linting"
],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment