https://github.com/bkahlert/build-runner
Multiplatform Alpine based SSH accessible Docker image with Docker CLI and OpenJDK 11 installed
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Multiplatform Alpine based SSH accessible Docker image with Docker CLI and OpenJDK 11 installed
Basic Info
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
- Releases: 2
Topics
Metadata Files
README.md
bkahlert/build-runner

About
bkahlert/build-runner is a multiplatform Alpine based SSH accessible Docker image with Docker CLI and OpenJDK 11 installed. It is compatible with IntelliJ IDEA run targets feature.
SSH connection to a running instance of bkahlert/build-runner
Build locally
```shell git clone https://github.com/bkahlert/build-runner.git cd build-runner
Build image and output to docker (default)
docker buildx bake
Build multi-platform image
docker buildx bake image-all ```
Image
- Docker Hub
bkahlert/build-runner - GitHub Container Registry
ghcr.io/bkahlert/build-runner
Following platforms for this image are available:
- linux/amd64
- linux/arm64/v8
Usage
Run as an application
If you pass arguments to the container, they will be treated like a regular command line. The container will run the command line and terminate.
shell
docker run --rm -it \
-v "$(pwd):$(pwd)" \
-w "$(pwd)" \
bkahlert/build-runner:edge \
javac --version
Run as a service / SSH server
Starting the container without any arguments will launch an SSH server that will listen for connections.
By default, authentication uses public key. Since no public key is provided in the bkahlert/build-runner,
a public key must be provided at startup:
```shell
start container
docker run -d --rm \ -e AUTHORIZEDKEYS="$(cat ~/.ssh/idrsa.pub)" \ -v "$(pwd):$(pwd)" \ -w "$(pwd)" \ -p 2022:2022 \ "build-runner:edge"
connect
ssh \ -i ~/.ssh/id_rsa \ -o StrictHostKeyChecking=no \ -o UserKnownHostsFile=/dev/null \ -o LogLevel=ERROR \ -p 2022 \ "runner@localhost" \ id ```
Alternatively a password can be provided which enables password and disables public key authentication:
```shell
start container
docker run -d --rm \ -e PASSWORD=pass1234 \ -v "$(pwd):$(pwd)" \ -w "$(pwd)" \ -p 2022:2022 \ "build-runner:edge"
connect
sshpass -p "pass1234" ssh \ -o StrictHostKeyChecking=no \ -o UserKnownHostsFile=/dev/null \ -o LogLevel=ERROR \ -p 2022 \ "runner@localhost" \ id ```
See configuration to set the public key or password during build time.
Configuration
This image can be configured using the following options of which all but APP_USER and APP_GROUP exist as both—build argument and environment variable.
You should go for build arguments if you want to set custom defaults you don't intend to change (often). Environment variables will overrule any existing
configuration on each container start.
APP_USERName of the main user (default:runner)APP_GROUPName of the main user's group (default:runner)DEBUGWhether to log debug information (default:0)TZTimezone the container runs in (default:UTC)LANGLanguage/locale to use (default:C.UTF-8)PUIDUser ID of therunneruser (default:1000)PGIDGroup ID of therunnergroup (default:1000)AUTHORIZED_KEYSPublic key(s) that can be used to log in via SSH asrunnerPASSWORDPassword ofrunner(default:runner)
🔐 Specifying authorized key(s) will automatically disable password-based authentication. An eventually also configured password will be ignored.
Setting authorized key(s) to an empty string, will re-enable the password-based authentication with either the provided or otherwise a randomly generated password.
```shell
Build single image with build argument AUTHORIZED_KEYS
docker buildx bake --set "*.args.AUTHORIZEDKEYS=$(cat ~/.ssh/idrsa.pub)"
Build multi-platform image with build argument AUTHORIZED_KEYS
docker buildx bake image-all --set "*.args.AUTHORIZEDKEYS=$(cat ~/.ssh/idrsa.pub)"
Start container with environment variable AUTHORIZED_KEYS
docker run --rm \ -e AUTHORIZEDKEYS="$(cat ~/.ssh/idrsa.pub)" \ -v "$(pwd):$(pwd)" \ -w "$(pwd)" \ -p 2022:2022 \ build-runner:local ```
Testing
```shell git clone https://github.com/bkahlert/build-runner.git cd build-runner
Use Bats wrapper to run tests
curl -LfsS https://git.io/batsw \ | DOCKERBAKE="--set '*.tags=test'" "$SHELL" -s -- --batsw:-e --batsw:BUILDTAG=test test ```
Bats Wrapper is a self-contained wrapper to run tests based on the Bash testing framework Bats.
💡 To accelerate testing, the Bats Wrapper checks if any test is prefixed with a capital X and if so, only runs those tests.
Troubleshooting
- To avoid permission problems with generated files, you can use your local user/group ID (see
PUID/PGID). - If you need access to Docker, its command line interface is already installed.
You can control your host instance by mounting/var/run/docker.sock.
shell
docker run -it --rm \
-e PUID="$(id -u)" \
-e PGID="$(id -g)" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$PWD":"$PWD" \
-w "$PWD" \
bkahlert/build-runner:edge
Contributing
Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by making a PayPal donation to ensure this journey continues indefinitely!
Thanks again for your support, it is much appreciated! :pray:
License
MIT. See LICENSE for more details.
Owner
- Name: Björn Kahlert
- Login: bkahlert
- Kind: user
- Location: Berlin, Germany
- Website: bkahlert.com
- Repositories: 23
- Profile: https://github.com/bkahlert
GitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Björn Kahlert | m****l@b****m | 31 |
| dependabot[bot] | 4****] | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 0
- Total pull requests: 16
- Average time to close issues: N/A
- Average time to close pull requests: 2 months
- Total issue authors: 0
- Total pull request authors: 3
- Average comments per issue: 0
- Average comments per pull request: 0.44
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 15
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (13)
- github-actions[bot] (2)
- bkahlert (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v2 composite
- actions/upload-artifact v2 composite
- bkahlert/bats-wrapper v0.1.4 composite
- docker/bake-action v1 composite
- docker/login-action v1 composite
- docker/metadata-action v3 composite
- docker/setup-buildx-action v1 composite
- docker/setup-qemu-action v1 composite
- softprops/action-gh-release v1 composite
- actions/checkout v2 composite
- actions/upload-artifact v2 composite
- bkahlert/recordr v0.2.2 composite
- peter-evans/create-pull-request v3 composite
- dorny/test-reporter v1 composite
- docker 20.10.12-alpine3.14 build