-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0513345
commit 65a9f82
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,18 @@ | ||
|
||
# Set Docker Log Level (docker-log-level) | ||
|
||
Sets the docker log-level (https://docs.docker.com/config/daemon/logs/) to warn by creating a `/etc/docker/daemon.json` file. | ||
|
||
## Example Usage | ||
|
||
```json | ||
"features": { | ||
"ghcr.io/customink/codespaces-features/docker-log-level": {} | ||
} | ||
``` | ||
|
||
## Options | ||
|
||
| Options Id | Description | Type | Default Value | | ||
|------------|------------------------------|--------|---------------| | ||
| level | Select the Docker log-level. | string | warn | |
This file contains 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,15 @@ | ||
{ | ||
"id": "docker-log-level", | ||
"name": "Set Docker Log Level", | ||
"version": "1.0.0", | ||
"description": "Creates a daemon.json with log-level", | ||
"documentationURL": "https://github.com/customink/codespaces-features/tree/main/src/docker-log-level", | ||
"options": { | ||
"level": { | ||
"type": "string", | ||
"description": "Select the Docker log-level.", | ||
"enum": ["debug", "info", "warn", "error", "fatal"], | ||
"default": "warn" | ||
} | ||
} | ||
} |
This file contains 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,13 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
echo "== [Custom Ink] installing 'docker-log-level' features ... ==" | ||
|
||
if [ ! "${CODESPACES}" = "true" ]; then | ||
echo "== [Custom Ink] detected CODESPACES=true ==" | ||
sudo mkdir -p /etc/docker | ||
echo '{ "log-level": "warn" }' | sudo tee /etc/docker/daemon.json | ||
else | ||
echo "== [Custom Ink] CODESPACES not detected in env. ==" | ||
env | ||
fi |