-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cleanup, add usage and readme, update build schedule
- Loading branch information
Showing
3 changed files
with
58 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
branches: | ||
- main | ||
schedule: | ||
- cron: '15 2 * * SUN' | ||
- cron: '30 2 * * SUN' | ||
|
||
jobs: | ||
build-and-push: | ||
|
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,16 @@ | ||
name: Container Registry Cleanup | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '30 2 * * MON' | ||
|
||
jobs: | ||
untagged-cleanup: | ||
uses: "tweedegolf/actions-container-helpers/.github/workflows/container-untagged-cleanup.yml@main" | ||
with: | ||
package: rust-dev |
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 |
---|---|---|
@@ -1 +1,42 @@ | ||
# Rust development Docker images | ||
This development image contains a Rust compiler toolchain and a C/C++ compiler | ||
toolchain. It also includes debugging and analysis tools such as lldb, gdb and | ||
valgrind. This image is intended for development only. For production use-cases | ||
you should just start with the base debian image and add your compiled binaries | ||
to it (and install any optional library dependencies). Currently these versions | ||
are supported: | ||
|
||
* Rust stable: `stable` (`ghcr.io/tweedegolf/rust-dev:stable`) | ||
* Rust 1.77: `1.77`, `latest` (`ghcr.io/tweedegolf/rust-dev:1.77`) | ||
* Rust 1.76: `1.76` (`ghcr.io/tweedegolf/rust-dev:1.76`) | ||
* Rust beta: `beta` (`ghcr.io/tweedegolf/rust-dev:beta`) | ||
* Rust nightly: `nightly` (`ghcr.io/tweedegolf/rust-dev:nightly`) | ||
|
||
Furthermore, each version also has a `-node` variant that includes the latest | ||
LTS release of node.js and yarn. | ||
|
||
## Usage in docker compose | ||
|
||
```yaml | ||
services: | ||
# ... | ||
app: | ||
image: ghcr.io/tweedegolf/rust-dev:stable | ||
# You will have to define the USER_ID and GROUP_ID environment variables | ||
# as `export USER_ID=$(id -u)` and `export GROUP_ID=$(id -g)` if they | ||
# have not already been defined previously | ||
user: "$USER_ID:$GROUP_ID" | ||
volumes: [.:/app] | ||
# Change to whatever command you wish to use instead of cargo watch | ||
command: [cargo, watch, -x, "run"] | ||
working_dir: /app | ||
environment: | ||
# This allows sharing cargo download even across multiple containers | ||
CARGO_HOME: ".cargo" | ||
# Create a separate target dir inside the container to prevent | ||
# waiting for rust-analyzer on your host | ||
CARGO_TARGET_DIR: "target-docker" | ||
# Optionally define some ports to use externally | ||
ports: ["127.0.0.1:8000:8000"] | ||
|
||
# ... |