generated from devcontainers/feature-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add passwordFile
, hashedPasswordFile
, githubAuthTokenFile
and absProxyBasePath
options
#10
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
245befb
feat: add `passwordFile` and `hashedPasswordFile` options
DanielleMaywood e928205
feat: add `githubAuthTokenFile` option
DanielleMaywood 5a1700c
feat: add 'absProxyBasePath' option
DanielleMaywood 3e1dae4
chore: useless cat award 🐈
DanielleMaywood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Optional: Import test library bundled with the devcontainer CLI | ||
source dev-container-features-test-lib | ||
|
||
# Feature-specific tests | ||
check "code-server version" code-server --version | ||
check "code-server running" pgrep -f 'code-server/lib/node.*/code-server' | ||
check "code-server listening" lsof -i "@127.0.0.1:8080" | ||
|
||
check "code-server hashed-password-file" grep $'export HASHED_PASSWORD="$(cat \'/tmp/code-server-hashed-password\')"' < /usr/local/bin/code-server-entrypoint | ||
check "code-server hashed-password" grep 'Using password from $HASHED_PASSWORD' < /tmp/code-server.log | ||
|
||
# Report results | ||
reportResults |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu | ||
|
||
RUN su vscode -c 'echo "\$argon2id\$v=19\$m=16,t=2,p=1\$c2FtcGxlc2FsdA\$YBn10Qizrh/i2jf/rPOCCA" > /tmp/code-server-hashed-password' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Optional: Import test library bundled with the devcontainer CLI | ||
source dev-container-features-test-lib | ||
|
||
# Feature-specific tests | ||
check "code-server version" code-server --version | ||
check "code-server running" pgrep -f 'code-server/lib/node.*/code-server' | ||
check "code-server listening" lsof -i "@127.0.0.1:8080" | ||
|
||
check "code-server password-file" grep $'export PASSWORD="$(cat \'/tmp/code-server-password\')"' < /usr/local/bin/code-server-entrypoint | ||
check "code-server password" grep 'Using password from $PASSWORD' < /tmp/code-server.log | ||
|
||
# Report results | ||
reportResults |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu | ||
|
||
RUN su vscode -c "echo 'some sample password' > /tmp/code-server-password" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: useless use of cat 😄 and
"
is fine within$()
.We don't have the same shell safety for inputs here (as with
declare -p
) but arguably if someone passes a file name with"
in it then they might have other problems too.